diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 3780a24f1..81a23f69d 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -66,14 +66,12 @@ 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 + command: pages deploy dist-cf --project-name=${{ env.PAGES_PROJECT_NAME }} gitHubToken: ${{ secrets.GITHUB_TOKEN }} - wranglerVersion: '3' - 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..78f283898 100644 --- a/.github/workflows/build-with-image.yml +++ b/.github/workflows/build-with-image.yml @@ -49,14 +49,12 @@ 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 + command: pages deploy dist-cf --project-name=${{ env.PAGES_PROJECT_NAME }} gitHubToken: ${{ secrets.GITHUB_TOKEN }} - wranglerVersion: '3' - name: Setup Github Pages uses: actions/configure-pages@v5 diff --git a/.github/workflows/previews-cf.yml b/.github/workflows/previews-cf.yml index 0cfd062e3..c41415b12 100644 --- a/.github/workflows/previews-cf.yml +++ b/.github/workflows/previews-cf.yml @@ -76,27 +76,24 @@ 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 }} + command: pages deploy dist --project-name=${{ env.PAGES_PROJECT_NAME }} --branch=${{ github.head_ref || github.ref_name }} gitHubToken: ${{ secrets.GITHUB_TOKEN }} - wranglerVersion: '3' - name: Comment PR uses: thollander/actions-comment-pull-request@v3 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