@@ -43,33 +43,21 @@ jobs:
4343 - name : Render site
4444 run : uv run python render.py Examples.build.ipynb
4545
46- - name : Deploy to Netlify (Production)
46+ - name : Deploy to Cloudflare Pages (Production)
4747 if : github.ref == 'refs/heads/master' && github.event_name == 'push'
48- uses : nwtgck/actions-netlify @v3
48+ uses : cloudflare/wrangler-action @v3
4949 with :
50- publish-dir : ./web
51- production-deploy : true
52- github-token : ${{ secrets.GITHUB_TOKEN }}
53- deploy-message : " Deploy from GitHub Actions - ${{ github.event.head_commit.message }}"
54- enable-pull-request-comment : false
55- enable-commit-comment : false
56- env :
57- NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
58- NETLIFY_SITE_ID : ${{ secrets.NETLIFY_SITE_ID }}
50+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
51+ accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
52+ command : pages deploy web --project-name=pythonplot --branch=main
5953
60- - name : Deploy to Netlify (Preview)
54+ - name : Deploy to Cloudflare Pages (Preview)
6155 if : github.ref != 'refs/heads/master'
62- uses : nwtgck/actions-netlify @v3
56+ uses : cloudflare/wrangler-action @v3
6357 with :
64- publish-dir : ./web
65- production-deploy : false
66- github-token : ${{ secrets.GITHUB_TOKEN }}
67- deploy-message : " Preview deploy from GitHub Actions"
68- enable-pull-request-comment : true
69- enable-commit-comment : false
70- env :
71- NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
72- NETLIFY_SITE_ID : ${{ secrets.NETLIFY_SITE_ID }}
58+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
59+ accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
60+ command : pages deploy web --project-name=pythonplot --branch=${{ github.head_ref || github.ref_name }}
7361
7462 - name : Upload build artifacts
7563 if : always()
0 commit comments