Skip to content

Commit 8a06a58

Browse files
authored
Add workflow for manually deploying docs (#1321)
1 parent 6da8107 commit 8a06a58

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Manual Docs Deploy
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
# Note: this should match the `deploy-docs` job in ci.yml
8+
deploy-docs-manual:
9+
runs-on: ubuntu-latest
10+
environment:
11+
name: deploy-docs
12+
url: https://ai.pydantic.dev
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-node@v4
18+
- run: npm install
19+
working-directory: docs-site
20+
21+
- uses: astral-sh/setup-uv@v5
22+
with:
23+
enable-cache: true
24+
25+
- uses: actions/download-artifact@v4
26+
with:
27+
name: site
28+
path: site
29+
30+
- uses: cloudflare/wrangler-action@v3
31+
with:
32+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
33+
workingDirectory: docs-site
34+
command: >
35+
deploy
36+
--var GIT_COMMIT_SHA:${{ github.sha }}
37+
--var GIT_BRANCH:main
38+
39+
- run: uv sync --group docs-upload
40+
- run: uv run python docs/.hooks/algolia.py upload
41+
env:
42+
ALGOLIA_WRITE_API_KEY: ${{ secrets.ALGOLIA_WRITE_API_KEY }}

0 commit comments

Comments
 (0)