pre-commit fixes #2
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: Deploy | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/configure-pages@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: .python-version | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Install dependencies | |
| run: uv sync --locked | |
| # Rewrites member_count in zensical.toml from Discord's invite API. | |
| - name: Refresh Discord member count | |
| continue-on-error: true | |
| run: uv run python scripts/refresh_member_count.py | |
| - name: Build | |
| run: uv run zensical build --strict | |
| - uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: site | |
| - uses: actions/deploy-pages@v5 | |
| id: deployment |