Manual Docs Deploy #1
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: Manual Docs Deploy | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| # Note: this should match the `deploy-docs` job in ci.yml | |
| deploy-docs-manual: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: deploy-docs | |
| url: https://ai.pydantic.dev | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| - run: npm install | |
| working-directory: docs-site | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: site | |
| path: site | |
| - uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| workingDirectory: docs-site | |
| command: > | |
| deploy | |
| --var GIT_COMMIT_SHA:${{ github.sha }} | |
| --var GIT_BRANCH:main | |
| - run: uv sync --group docs-upload | |
| - run: uv run python docs/.hooks/algolia.py upload | |
| env: | |
| ALGOLIA_WRITE_API_KEY: ${{ secrets.ALGOLIA_WRITE_API_KEY }} |