paper-updated #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build report from paper | |
| on: | |
| repository_dispatch: | |
| types: [paper-updated] | |
| workflow_dispatch: # manual trigger | |
| concurrency: | |
| group: build-report | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: wendlerc/AgentsOfChaos | |
| path: paper | |
| token: ${{ secrets.PAPER_PAT }} | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Build report | |
| run: python scripts/build.py --paper paper | |
| - name: Copy image assets | |
| run: rsync -a --delete paper/image_assets/ public/image_assets/ | |
| - name: Commit updated report | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add public/report.html public/data/ public/image_assets/ | |
| git diff --cached --quiet || git commit -m "Rebuild report from paper update" | |
| git pull --rebase | |
| git push |