Fix Github Pages deploy in the code changes (on main) workflow #2
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
| # Workflow that runs on code changes after merge to main. | |
| name: Manual Testing | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} | |
| POLICYENGINE_US_DATA_GITHUB_TOKEN: ${{ secrets.POLICYENGINE_US_DATA_GITHUB_TOKEN }} | |
| jobs: | |
| Test: | |
| permissions: | |
| contents: "write" | |
| # Required to auth against gcp | |
| id-token: "write" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v2 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.11' | |
| - uses: "google-github-actions/auth@v2" | |
| with: | |
| workload_identity_provider: "projects/322898545428/locations/global/workloadIdentityPools/policyengine-research-id-pool/providers/prod-github-provider" | |
| service_account: "policyengine-research@policyengine-research.iam.gserviceaccount.com" | |
| - name: Install package | |
| run: uv pip install -e .[dev] --system | |
| - name: Test documentation builds | |
| run: make documentation | |
| - name: Deploy documentation | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| BRANCH: gh-pages # The branch the action should deploy to. | |
| FOLDER: docs/_build/html # The folder the action should deploy. | |
| CLEAN: true # Optionally delete the contents of the release branch before deploying.jk | |