diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 3780a24f1..0e22a1c45 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -66,14 +66,11 @@ jobs: run: pnpm build-all - name: Deploy to Cloudflare - uses: cloudflare/pages-action@1 + uses: cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CI_CF_PAGES }} accountId: ${{ secrets.CF_ACCOUNT_ID }} - projectName: ${{ env.PAGES_PROJECT_NAME }} - directory: dist-cf - gitHubToken: ${{ secrets.GITHUB_TOKEN }} - wranglerVersion: '3' + command: pages deploy dist-cf --project-name=${{ env.PAGES_PROJECT_NAME }} - name: Setup Github Pages uses: actions/configure-pages@v5 diff --git a/.github/workflows/build-with-image.yml b/.github/workflows/build-with-image.yml index 7aea7dd6c..1b4b28d75 100644 --- a/.github/workflows/build-with-image.yml +++ b/.github/workflows/build-with-image.yml @@ -49,14 +49,11 @@ jobs: run: pnpm build-all - name: Deploy to Cloudflare - uses: cloudflare/pages-action@1 + uses: cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CI_CF_PAGES }} accountId: ${{ secrets.CF_ACCOUNT_ID }} - projectName: ${{ env.PAGES_PROJECT_NAME }} - directory: dist-cf - gitHubToken: ${{ secrets.GITHUB_TOKEN }} - wranglerVersion: '3' + command: pages deploy dist-cf --project-name=${{ env.PAGES_PROJECT_NAME }} - name: Setup Github Pages uses: actions/configure-pages@v5 diff --git a/.github/workflows/previews-cf.yml b/.github/workflows/previews-cf.yml index cd96a753e..32ef50379 100644 --- a/.github/workflows/previews-cf.yml +++ b/.github/workflows/previews-cf.yml @@ -76,27 +76,23 @@ jobs: run: pnpm build-cf - name: Deploy preview to Cloudflare - uses: cloudflare/pages-action@1 - id: pages-action + uses: cloudflare/wrangler-action@v3 + id: wrangler-action with: apiToken: ${{ secrets.CI_CF_PAGES }} accountId: ${{ secrets.CF_ACCOUNT_ID }} - projectName: ${{ env.PAGES_PROJECT_NAME }} - directory: dist - branch: ${{ github.head_ref || github.ref_name }} - gitHubToken: ${{ secrets.GITHUB_TOKEN }} - wranglerVersion: '3' + command: pages deploy dist --project-name=${{ env.PAGES_PROJECT_NAME }} --branch=${{ github.head_ref || github.ref_name }} - name: Comment PR uses: thollander/actions-comment-pull-request@v2 with: message: | - Deployed ${{ steps.pages-action.outputs.environment }} build to Cloudflare! + Deployed build to Cloudflare! | | | | ----------------------- | - | | **Last commit:** | ${{ github.event.pull_request.head.sha || github.event.workflow_run.head_sha || github.sha }} | - | **Preview URL**: | ${{ steps.pages-action.outputs.url }} | + | **Preview URL**: | ${{ steps.wrangler-action.outputs.deployment-url }} | | **Branch Preview URL**: | https://${{ github.head_ref || github.ref_name }}.${{ env.PAGES_PROJECT_URL_SLUG }}.pages.dev | comment_tag: deployment mode: upsert