File tree Expand file tree Collapse file tree 1 file changed +27
-8
lines changed Expand file tree Collapse file tree 1 file changed +27
-8
lines changed Original file line number Diff line number Diff line change 66 - master
77
88jobs :
9- deploy :
10- permissions :
11- actions : read
12- contents : read
13- deployments : write
14- issues : write
15- pull-requests : write
9+ # Job 1: Build the code (no secrets here)
10+ build :
1611 runs-on : ubuntu-latest
17- timeout-minutes : 5
1812 steps :
1913 - name : Checkout code
2014 uses : actions/checkout@v4
2115 with :
2216 ref : ${{ github.event.pull_request.head.sha }}
17+ persist-credentials : false # Don't persist GitHub token
2318
2419 - name : Cache node_modules
2520 uses : actions/cache@v4
3631 - run : yarn install
3732 - run : yarn build
3833
34+ - name : Upload build artifact
35+ uses : actions/upload-artifact@v4
36+ with :
37+ name : dist-files
38+ path : dist
39+
40+ # Job 2: Deploy with secrets (no PR code checkout)
41+ deploy :
42+ needs : build # Wait for build job to complete
43+ permissions :
44+ actions : read
45+ contents : read
46+ deployments : write
47+ issues : write
48+ pull-requests : write
49+ runs-on : ubuntu-latest
50+ timeout-minutes : 5
51+ steps :
52+ - name : Download build artifact
53+ uses : actions/download-artifact@v4
54+ with :
55+ name : dist-files
56+ path : dist
57+
3958 - name : Deploy to Cloudflare
4059 id : deploy
4160 uses : cloudflare/wrangler-action@v3
You can’t perform that action at this time.
0 commit comments