Generate and Deploy Badge Wall #79
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: Generate and Deploy Badge Wall | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [main] | |
| schedule: | |
| - cron: '0 0 * * 1' # Weekly on Monday | |
| workflow_dispatch: | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - uses: astral-sh/setup-uv@v6.5.0 | |
| - name: Set up Python | |
| run: uv python install | |
| - name: Create and activate virtual environment | |
| run: | | |
| uv venv | |
| echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV | |
| echo "$PWD/.venv/bin" >> $GITHUB_PATH | |
| - name: Install dependencies | |
| run: uv pip install . | |
| - name: Generate badge wall | |
| run: generate-badges | |
| env: | |
| TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Copy PWA files | |
| run: | | |
| cp manifest.json docs/manifest.json | |
| cp wall/badge_generator/templates/service-worker.js docs/service-worker.js | |
| mkdir -p docs/assets | |
| cp assets/icon-192x192.png docs/assets/ | |
| cp assets/icon-512x512.png docs/assets/ | |
| - name: Deploy to GitHub Pages | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| folder: docs |