File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99jobs :
1010 build-and-deploy :
1111 runs-on : ubuntu-latest
12+ env :
13+ HAS_CF_TOKEN : ${{ secrets.CLOUDFLARE_API_TOKEN != '' }}
1214
1315 steps :
1416 - name : Checkout code
@@ -44,15 +46,15 @@ jobs:
4446 run : uv run python render.py Examples.build.ipynb
4547
4648 - name : Deploy to Cloudflare Pages (Production)
47- if : github.ref == 'refs/heads/master' && github.event_name == 'push'
49+ if : github.ref == 'refs/heads/master' && github.event_name == 'push' && env.HAS_CF_TOKEN == 'true'
4850 uses : cloudflare/wrangler-action@v3
4951 with :
5052 apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
5153 accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
5254 command : pages deploy web --project-name=pythonplot --branch=main
5355
5456 - name : Deploy to Cloudflare Pages (Preview)
55- if : github.ref != 'refs/heads/master'
57+ if : github.ref != 'refs/heads/master' && env.HAS_CF_TOKEN == 'true'
5658 uses : cloudflare/wrangler-action@v3
5759 with :
5860 apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments