]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
👷 Update Cloudflare GitHub Action (#12387)
authorSebastián Ramírez <tiangolo@gmail.com>
Sat, 5 Oct 2024 12:49:04 +0000 (14:49 +0200)
committerGitHub <noreply@github.com>
Sat, 5 Oct 2024 12:49:04 +0000 (14:49 +0200)
.github/workflows/deploy-docs.yml

index d2953f2841c122fe276b4d560d4620d91a3a733f..c7827f13291af6b16b67e3a3cb75b26d2e945a10 100644 (file)
@@ -55,14 +55,14 @@ jobs:
         # hashFiles returns an empty string if there are no files
         if: hashFiles('./site/*')
         id: deploy
-        uses: cloudflare/pages-action@v1
+        env:
+          PROJECT_NAME: fastapitiangolo
+          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 ) }}
+        uses: cloudflare/wrangler-action@v3
         with:
           apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
           accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
-          projectName: fastapitiangolo
-          directory: './site'
-          gitHubToken: ${{ secrets.GITHUB_TOKEN }}
-          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 ) }}
+          command: pages deploy ./site --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.BRANCH }}
       - name: Comment Deploy
         run: python ./scripts/deploy_docs_status.py
         env: