File tree Expand file tree Collapse file tree 5 files changed +969
-2
lines changed Expand file tree Collapse file tree 5 files changed +969
-2
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 : [main]
6+ workflow_dispatch :
7+
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-latest
11+ name : Deploy to Cloudflare Workers
12+ steps :
13+ - uses : actions/checkout@v4
14+ with :
15+ fetch-depth : 0
16+
17+ - name : Setup pnpm
18+ uses : pnpm/action-setup@v4
19+
20+ - name : Setup Node.js
21+ uses : actions/setup-node@v4
22+ with :
23+ node-version : 22
24+ cache : pnpm
25+
26+ - name : Install dependencies
27+ run : pnpm install --frozen-lockfile
28+
29+ - name : Build with VitePress
30+ run : pnpm run docs:build
31+
32+ - name : Deploy to Cloudflare Workers
33+ uses : cloudflare/wrangler-action@v3
34+ with :
35+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
36+ accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
37+ command : deploy
Original file line number Diff line number Diff line change 11{
22 "packageManager" : " pnpm@9.0.0" ,
33 "devDependencies" : {
4- "vitepress" : " ^2.0.0-alpha.12"
4+ "vitepress" : " ^2.0.0-alpha.12" ,
5+ "wrangler" : " ^4.44.0"
56 },
67 "scripts" : {
78 "docs:dev" : " vitepress dev docs" ,
89 "docs:build" : " vitepress build docs" ,
9- "docs:preview" : " vitepress preview docs"
10+ "docs:preview" : " vitepress preview docs" ,
11+ "deploy:cf" : " pnpm run docs:build && wrangler deploy"
1012 },
1113 "dependencies" : {
1214 "vitepress-plugin-comment-with-giscus" : " ^1.1.15"
You can’t perform that action at this time.
0 commit comments