File tree Expand file tree Collapse file tree 2 files changed +41
-7
lines changed
Expand file tree Collapse file tree 2 files changed +41
-7
lines changed Original file line number Diff line number Diff line change 3636 - name : Build Quartz
3737 run : npx quartz build -d docs -v
3838
39- - name : Publish to Cloudflare Pages
40- uses : AdrianGonz97/refined-cf-pages-action@v1
39+ - name : Upload build artifact
40+ uses : actions/upload-artifact@v4
4141 with :
42- apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
43- accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
44- githubToken : ${{ secrets.GITHUB_TOKEN }}
45- projectName : quartz
46- directory : public
42+ name : preview-build
43+ path : public
Original file line number Diff line number Diff line change 1+ name : Upload Preview Deployment
2+ on :
3+ workflow_run :
4+ workflows : ["Build Preview Deployment"]
5+ types :
6+ - completed
7+
8+ permissions :
9+ actions : read
10+ deployments : write
11+ contents : read
12+ pull-requests : write
13+
14+ jobs :
15+ deploy-preview :
16+ if : ${{ github.repository == 'jackyzha0/quartz' && github.event.workflow_run.conclusion == 'success' }}
17+ runs-on : ubuntu-latest
18+ name : Deploy Preview to Cloudflare Pages
19+ steps :
20+ - name : Download build artifact
21+ uses : actions/download-artifact@v4
22+ id : preview-build-artifact
23+ with :
24+ name : preview-build
25+ path : build
26+ github-token : ${{ secrets.GITHUB_TOKEN }}
27+ run-id : ${{ github.event.workflow_run.id }}
28+
29+ - name : Deploy to Cloudflare Pages
30+ uses : AdrianGonz97/refined-cf-pages-action@v1
31+ with :
32+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
33+ accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
34+ githubToken : ${{ secrets.GITHUB_TOKEN }}
35+ projectName : YOUR_PROJECT_NAME
36+ deploymentName : Preview
37+ directory : ${{ steps.preview-build-artifact.outputs.download-path }}
You can’t perform that action at this time.
0 commit comments