quick fix for agent default behaviour (#136) #117
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 Site | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| deploy_production: | |
| description: "Deploy to production" | |
| type: boolean | |
| required: false | |
| default: true | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - "docs/**" | |
| - "docs-site/**" | |
| - ".github/workflows/deploy-docs.yaml" | |
| pull_request: | |
| paths: | |
| - "docs/**" | |
| - "docs-site/**" | |
| - ".github/workflows/deploy-docs.yaml" | |
| env: | |
| # GCS bucket for static docs files (e.g., "everyrow-docs") | |
| # Traefik needs to route everyrow.io/docs/* to this bucket | |
| DOCS_BUCKET: ${{ vars.DOCS_BUCKET }} | |
| permissions: | |
| contents: read | |
| id-token: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # --- Python setup for notebook conversion --- | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| # TODO: Re-enable after fixing notebook descriptions (see PR #91) | |
| # - name: Validate notebook structure | |
| # run: python docs-site/scripts/validate-notebooks.py | |
| - name: Convert notebooks to HTML | |
| run: uv run --group case-studies python docs-site/scripts/convert-notebooks.py | |
| # --- Node.js setup for docs site --- | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| cache-dependency-path: "docs-site/pnpm-lock.yaml" | |
| - name: Install dependencies | |
| working-directory: ./docs-site | |
| run: pnpm install --frozen-lockfile | |
| - name: Build static site | |
| working-directory: ./docs-site | |
| run: pnpm build | |
| - name: Check for broken links | |
| run: python docs-site/scripts/check-links.py | |
| - name: Log in to Google Cloud | |
| if: ${{ github.ref == 'refs/heads/main' || inputs.deploy_production }} | |
| uses: google-github-actions/auth@v2 | |
| with: | |
| credentials_json: ${{ secrets.GCP_CREDENTIALS_GLOBAL }} | |
| - name: Set up Cloud SDK | |
| if: ${{ github.ref == 'refs/heads/main' || inputs.deploy_production }} | |
| uses: google-github-actions/setup-gcloud@v2 | |
| - name: Deploy docs site to GCS | |
| if: ${{ github.ref == 'refs/heads/main' || inputs.deploy_production }} | |
| working-directory: ./docs-site | |
| run: | | |
| gsutil -m -h "Cache-Control:max-age=300" rsync -r -d ./out/ gs://${{ env.DOCS_BUCKET }} |