99
1010permissions :
1111 contents : read
12- pages : write
13- id-token : write
1412
1513concurrency :
16- group : pages
17- cancel-in-progress : false
14+ group : ${{ github.workflow }}-${{ github.ref }}
15+ cancel-in-progress : true
1816
1917jobs :
2018 build :
3533 node-version : ' 20'
3634 cache : pnpm
3735
38- - name : Setup Pages
39- if : github.ref == 'refs/heads/develop' && github.event_name == 'push' && github.repository == 'connectbot/connectbot.github.io'
40- uses : actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
41-
4236 - name : Restore cache
4337 uses : actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
4438 with :
@@ -60,26 +54,10 @@ jobs:
6054 - name : Build
6155 run : pnpm run build
6256
63- - name : Upload artifact
57+ - name : Deploy to Cloudflare Pages
6458 if : github.ref == 'refs/heads/develop' && github.event_name == 'push' && github.repository == 'connectbot/connectbot.github.io'
65- uses : actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
59+ uses : cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3.14.1
6660 with :
67- path : ./out
68-
69- deploy :
70- environment :
71- name : github-pages
72- url : ${{ steps.deployment.outputs.page_url }}
73- runs-on : ubuntu-latest
74- needs : build
75- if : github.ref == 'refs/heads/develop' && github.event_name == 'push' && github.repository == 'connectbot/connectbot.github.io'
76- steps :
77- - name : Deploy to GitHub Pages
78- id : deployment
79- uses : actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
80-
81- - name : Purge Cloudflare cache
82- uses : jakejarvis/cloudflare-purge-action@eee6dba0236093358f25bb1581bd615dc8b3d8e3 # v0.3.0
83- env :
84- CLOUDFLARE_ZONE : ${{ secrets.CLOUDFLARE_ZONE }}
85- CLOUDFLARE_TOKEN : ${{ secrets.CLOUDFLARE_TOKEN }}
61+ apiToken : ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
62+ accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
63+ command : pages deploy ./out --project-name=connectbot-website
0 commit comments