Skip to content

Commit d9415d5

Browse files
authored
PR previews (#815)
1 parent de50759 commit d9415d5

File tree

13 files changed

+1257
-84
lines changed

13 files changed

+1257
-84
lines changed

.github/workflows/after-ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
- uses: dawidd6/action-download-artifact@v6
2222
with:
2323
workflow: ci.yml
24+
name: '(diff-)?coverage-html.*'
25+
name_is_regexp: true
2426
commit: ${{ github.event.workflow_run.head_sha }}
2527
allow_forks: true
2628
workflow_conclusion: completed
@@ -53,6 +55,7 @@ jobs:
5355
url: ${{ steps.get_preview_url.outputs.preview_url }}
5456

5557
steps:
58+
- uses: actions/checkout@v4
5659
- uses: dawidd6/action-download-artifact@v6
5760
with:
5861
workflow: ci.yml

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ jobs:
7474
ALGOLIA_WRITE_API_KEY: ${{ secrets.ALGOLIA_WRITE_API_KEY }}
7575

7676
- run: tree site
77+
- uses: actions/setup-node@v4
78+
- run: npm install
79+
working-directory: docs-site
80+
- run: npm run typecheck
81+
working-directory: docs-site
7782

7883
- name: Store docs
7984
uses: actions/upload-artifact@v4
@@ -223,6 +228,29 @@ jobs:
223228
jobs: ${{ toJSON(needs) }}
224229
allowed-skips: test-live
225230

231+
deploy-docs:
232+
if: "success() && github.ref == 'refs/heads/main'"
233+
runs-on: ubuntu-latest
234+
needs: [check]
235+
environment:
236+
name: deploy-docs
237+
url: https://testing-ai.pydantic.dev
238+
239+
steps:
240+
- uses: actions/download-artifact@v4
241+
with:
242+
name: docs-site
243+
path: site
244+
245+
- uses: cloudflare/wrangler-action@v3
246+
with:
247+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
248+
workingDirectory: docs-site
249+
command: >
250+
deploy
251+
--var GIT_COMMIT_SHA:${{ github.sha }}
252+
--var GIT_BRANCH:main
253+
226254
release:
227255
needs: [check]
228256
if: "success() && startsWith(github.ref, 'refs/tags/')"

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ site
33
.venv
44
dist
55
__pycache__
6-
*.env
6+
.env
7+
.dev.vars
78
/scratch/
89
/.coverage
910
env*/
@@ -14,3 +15,4 @@ examples/pydantic_ai_examples/.chat_app_messages.sqlite
1415
.cache/
1516
.vscode/
1617
/question_graph_history.json
18+
/docs-site/.wrangler/

0 commit comments

Comments
 (0)