File tree Expand file tree Collapse file tree 1 file changed +12
-30
lines changed
Expand file tree Collapse file tree 1 file changed +12
-30
lines changed Original file line number Diff line number Diff line change 1- name : Build and Deploy to gh-pages
1+ name : Trigger Cloudflare Pages
22
33on :
44 release :
55 types : [published]
66
77permissions :
8- contents : write
8+ contents : read
99
1010jobs :
11- build-and-deploy :
11+ trigger-pages :
1212 runs-on : ubuntu-latest
13-
1413 steps :
15- - name : Checkout code
16- uses : actions/checkout@v4
17-
18- - name : Install pnpm
19- uses : pnpm/action-setup@v4
20- with :
21- version : 10
22-
23- - name : Use Node.js
24- uses : actions/setup-node@v4
25- with :
26- node-version : 20
27- cache : ' pnpm'
28-
29- - name : Install dependencies
30- run : pnpm install
31-
32- - name : Build the site
33- run : pnpm run build
34-
35- - name : Deploy to gh-pages branch
36- uses : peaceiris/actions-gh-pages@v3
37- with :
38- github_token : ${{ secrets.GITHUB_TOKEN }}
39- publish_dir : dist
40- publish_branch : gh-pages
14+ - name : Trigger Cloudflare Pages deploy hook
15+ env :
16+ HOOK_URL : ${{ secrets.CLOUDFLARE_DEPLOY_HOOK_URL }}
17+ run : |
18+ if [ -z "$HOOK_URL" ]; then
19+ echo "CLOUDFLARE_DEPLOY_HOOK_URL not set"
20+ exit 1
21+ fi
22+ curl -X POST "$HOOK_URL" --fail --show-error
You can’t perform that action at this time.
0 commit comments