Rework Agora representative statement selection #190
Workflow file for this run
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 Docs" | |
| on: | |
| # Run directly on pull request (we skip deploy step in this case) | |
| pull_request: | |
| # On main branch, trigger real deploy after tests pass. | |
| workflow_run: | |
| workflows: [Run Tests] | |
| types: [completed] | |
| branches: [main] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| inputs: | |
| enableCache: | |
| description: "Enable cache of installed dependencies" | |
| type: boolean | |
| default: true | |
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
| # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| # Enable cache, except when manually triggered and explicitly disabled. | |
| enable-cache: ${{ github.event_name != 'workflow_dispatch' || inputs.enableCache }} | |
| version: "latest" | |
| # As a library, we're not version-controlling uv.lock, so need pyproject.toml check. | |
| # See: https://github.com/astral-sh/setup-uv/issues/261#issue-2818259989 | |
| cache-dependency-glob: | | |
| **/*(requirements|constraints)*.(txt|in) | |
| **/pyproject.toml | |
| **/uv.lock | |
| - name: Create virtual environment | |
| run: make venv | |
| - name: Install dependencies | |
| run: make install-dev | |
| - name: Build MkDocs site | |
| run: make docs-build | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./site | |
| # Deploy job | |
| deploy: | |
| # Only deploy if we're not on a pull request trigger. | |
| if: github.event_name != 'pull_request' | |
| name: Deploy | |
| needs: build | |
| # Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
| permissions: | |
| contents: read # default | |
| pages: write # to deploy to Pages | |
| id-token: write # to verify the deployment originates from an appropriate source | |
| # Deploy to the github-pages environment | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| # Specify runner + deployment step | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action |