Skip to content

mirror‑matrix‑room #274

mirror‑matrix‑room

mirror‑matrix‑room #274

Workflow file for this run

name: mirror‑matrix‑room
permissions:
contents: write
pages: write
id-token: write
on:
schedule: # daily 03:07 UTC
- cron: '7 3 * * *'
workflow_dispatch:
push:
paths: [ 'scripts/update.py', '.github/workflows/mirror‑matrix‑room.yml' ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: '3.x' }
- run: pip install matrix-commander==8.*
- name: run archiver
run: python scripts/update.py
env:
MATRIX_HS: ${{ secrets.MATRIX_HS }}
MATRIX_USER: ${{ secrets.MATRIX_USER }}
MATRIX_TOKEN: ${{ secrets.MATRIX_TOKEN }}
MATRIX_ROOMS: ${{ secrets.MATRIX_ROOMS }}
# optional tunables
LISTEN_MODE: "all" # or tail / once
TIMEOUT: "1200"
TAIL_N: "20000"
- name: commit artefacts
run: |
git config user.name github-actions
git config user.email [email protected]
git add index.html archive
git diff --cached --quiet || git commit -m "bot: update $(date -u +'%F')" && git push
continue-on-error: true # don’t fail if nothing changed
# ── GitHub Pages ────────────────────────────────────────────────
- name: upload pages artefact
uses: actions/upload-pages-artifact@v3
with: { path: . } # contains root index.html & archive/
- name: deploy
id: deploy
uses: actions/deploy-pages@v4