From b16111d13d59e1b3a417ba155f8bd89bafe20cfd Mon Sep 17 00:00:00 2001 From: Luqi Pan Date: Wed, 27 Mar 2024 13:22:08 -0700 Subject: [PATCH] ci: switch back to using wrangler-action and use its output --- .github/workflows/build-deploy-doc.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-deploy-doc.yml b/.github/workflows/build-deploy-doc.yml index 97c203119..111677d15 100644 --- a/.github/workflows/build-deploy-doc.yml +++ b/.github/workflows/build-deploy-doc.yml @@ -47,13 +47,13 @@ jobs: - name: Publish to Cloudflare Pages id: publish-to-cloudflare-pages - uses: cloudflare/pages-action@v1 + uses: cloudflare/wrangler-action@v3 with: - wranglerVersion: '3' apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + # Cloudflare account ID is safe to be public + # Ref: https://github.com/cloudflare/wrangler-legacy/issues/209#issuecomment-541654484 accountId: 0c4635effffcd7f36d1b9f0425a4367a - projectName: documentation - directory: dist/ + command: pages deploy --project-name=documentation dist/ - name: Comment with preview URL uses: actions/github-script@v7 @@ -63,5 +63,5 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body:${{ steps.publish-to-cloudflare-pages.outputs.url }} + body: 'Cloudflare Pages Preview URL: ${{ steps.publish-to-cloudflare-pages.outputs.deployment-url }}' })