Skip to content

Commit

Permalink
ci: 改用 wrangler-action@v3 (#1223)
Browse files Browse the repository at this point in the history
* ci: 改用 wrangler-action@v3

* ci: 修复自动生成 PR 预览链接
  • Loading branch information
Leetfs authored Nov 23, 2024
1 parent b4a97ce commit 9179d51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:
run: hugo --minify --enableGitInfo --baseURL "/"

- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
id: deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_PAGES_ACCOUNT }}
projectName: mtfwiki
directory: public
command: pages deploy public --project-name=mtfwiki

8 changes: 4 additions & 4 deletions .github/workflows/preview-pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
outputs:
preview_url: ${{ steps.deploy.outputs.url }}
preview_url: ${{ steps.deploy.outputs.deployment-url }}
steps:
- name: 检出主仓库代码
uses: actions/checkout@v4
Expand Down Expand Up @@ -51,13 +51,13 @@ jobs:
run: hugo --minify --enableGitInfo --baseURL "/"

- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
id: deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_PAGES_ACCOUNT }}
projectName: mtfwiki-preview
directory: public
command: pages deploy public --project-name=mtfwiki-preview

# 获取预览链接并发送到PR
comment_on_pr:
needs: deploy
Expand Down

0 comments on commit 9179d51

Please sign in to comment.