Skip to content

Commit af59760

Browse files
committed
chore: update GitHub Actions workflow to install Wrangler and modify deployment command
1 parent fdea394 commit af59760

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/documents.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,13 @@ jobs:
5959
name: dist
6060
path: docs/.vitepress/dist
6161

62+
- name: Install Wrangler
63+
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.event_name == 'release' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success'))
64+
run: pnpm add -w wrangler
65+
6266
- name: Deploy
6367
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.event_name == 'release' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success'))
64-
uses: cloudflare/wrangler-action@v3
65-
with:
66-
apiToken: ${{ secrets.CF_API_TOKEN }}
67-
accountId: ${{ secrets.CF_ACCOUNT_ID }}
68-
command: pages deploy "docs/.vitepress/dist/" --commit-dirty=true --project-name=nginxui
68+
run: pnpm wrangler pages deploy "docs/.vitepress/dist/" --commit-dirty=true --project-name=nginxui
69+
env:
70+
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
71+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}

0 commit comments

Comments
 (0)