File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to Cloudflare Workers
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ jobs :
10+ deploy :
11+ runs-on : ubuntu-latest
12+ name : Deploy Docusaurus to Cloudflare Workers
13+
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v4
17+
18+ - name : Setup Node.js
19+ uses : actions/setup-node@v4
20+ with :
21+ node-version : " 18"
22+ cache : " npm"
23+ cache-dependency-path : docs/package-lock.json
24+
25+ - name : Install dependencies
26+ run : npm ci
27+ working-directory : docs
28+
29+ - name : Build Docusaurus site
30+ run : npm run build
31+ working-directory : docs
32+
33+ - name : Deploy to Cloudflare Workers
34+ uses : cloudflare/wrangler-action@v3
35+ with :
36+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
37+ accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
38+ workingDirectory : docs
39+ command : deploy
40+
41+ - name : Add deployment summary
42+ run : |
43+ echo "## 🚀 Deployment Successful" >> $GITHUB_STEP_SUMMARY
44+ echo "Your Docusaurus site has been deployed to Cloudflare Workers!" >> $GITHUB_STEP_SUMMARY
45+ echo "- **Build time**: $(date)" >> $GITHUB_STEP_SUMMARY
46+ echo "- **Branch**: ${{ github.ref_name }}" >> $GITHUB_STEP_SUMMARY
47+ echo "- **Commit**: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
You can’t perform that action at this time.
0 commit comments