@@ -12,6 +12,9 @@ permissions:
1212 pull-requests : write
1313 statuses : write
1414
15+ env :
16+ UV_SYSTEM_PYTHON : 1
17+
1518jobs :
1619 deploy-docs :
1720 runs-on : ubuntu-latest
@@ -25,14 +28,16 @@ jobs:
2528 uses : actions/setup-python@v5
2629 with :
2730 python-version : " 3.11"
28- - uses : actions/cache@v4
29- id : cache
31+ - name : Setup uv
32+ uses : astral-sh/setup-uv@v5
3033 with :
31- path : ${{ env.pythonLocation }}
32- key : ${{ runner.os }}-python-github-actions-${{ env.pythonLocation }}-${{ hashFiles('requirements-github-actions.txt') }}-v01
34+ version : " 0.4.15"
35+ enable-cache : true
36+ cache-dependency-glob : |
37+ requirements**.txt
38+ pyproject.toml
3339 - name : Install GitHub Actions dependencies
34- if : steps.cache.outputs.cache-hit != 'true'
35- run : pip install -r requirements-github-actions.txt
40+ run : uv pip install -r requirements-github-actions.txt
3641 - name : Deploy Docs Status Pending
3742 run : python ./scripts/deploy_docs_status.py
3843 env :
@@ -55,19 +60,19 @@ jobs:
5560 # hashFiles returns an empty string if there are no files
5661 if : hashFiles('./site/*')
5762 id : deploy
58- uses : cloudflare/pages-action@v1
63+ env :
64+ PROJECT_NAME : typertiangolo
65+ BRANCH : ${{ ( github.event.workflow_run.head_repository.full_name == github.repository && github.event.workflow_run.head_branch == 'master' && 'main' ) || ( github.event.workflow_run.head_sha ) }}
66+ uses : cloudflare/wrangler-action@v3
5967 with :
6068 apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
6169 accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
62- projectName : typertiangolo
63- directory : ' ./site'
64- gitHubToken : ${{ secrets.GITHUB_TOKEN }}
65- branch : ${{ ( github.event.workflow_run.head_repository.full_name == github.repository && github.event.workflow_run.head_branch == 'master' && 'main' ) || ( github.event.workflow_run.head_sha ) }}
70+ command : pages deploy ./site --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.BRANCH }}
6671 - name : Comment Deploy
6772 run : python ./scripts/deploy_docs_status.py
6873 env :
6974 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
70- DEPLOY_URL : ${{ steps.deploy.outputs.url }}
75+ DEPLOY_URL : ${{ steps.deploy.outputs.deployment- url }}
7176 COMMIT_SHA : ${{ github.event.workflow_run.head_sha }}
7277 RUN_ID : ${{ github.run_id }}
7378 IS_DONE : " true"
0 commit comments