File tree Expand file tree Collapse file tree 1 file changed +43
-1
lines changed Expand file tree Collapse file tree 1 file changed +43
-1
lines changed Original file line number Diff line number Diff line change 5454 with :
5555 path : apps/web/dist
5656
57- deploy :
57+ deploy-pages :
5858 needs : build
5959 permissions :
6060 pages : write
6767 - name : Deploy to GitHub Pages
6868 id : deployment
6969 uses : actions/deploy-pages@v4
70+
71+ deploy-cloudflare :
72+ needs : build
73+ runs-on : ubuntu-latest
74+ if : github.repository == 'doocs/md'
75+ steps :
76+ - name : Checkout
77+ uses : actions/checkout@v5
78+
79+ - name : Set up node
80+ uses : actions/setup-node@v6
81+ with :
82+ node-version : 22
83+
84+ - name : Setup pnpm
85+ uses : pnpm/action-setup@v4
86+ with :
87+ version : 10
88+
89+ - name : Install dependencies
90+ run : pnpm install
91+
92+ - name : Build for Cloudflare Workers
93+ run : pnpm web build:h5-netlify
94+ env :
95+ CF_PAGES : 1
96+
97+ - name : Deploy to Cloudflare Workers
98+ uses : cloudflare/wrangler-action@v3
99+ with :
100+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
101+ accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
102+ command : deploy --name md
103+ workingDirectory : apps/web
104+ env :
105+ CLOUDFLARE_API_TOKEN : ${{ secrets.CLOUDFLARE_API_TOKEN }}
106+ CLOUDFLARE_ACCOUNT_ID : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
107+
108+ - name : Deployment Summary
109+ run : |
110+ echo "🚀 Deployed to Cloudflare Workers!"
111+ echo "📍 URL: https://md.doocs.workers.dev"
You can’t perform that action at this time.
0 commit comments