File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy Documentation Preview
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ comment :
7+ description : ' Deployment Documentation'
8+ required : false
9+ default : ' Manual preview deployment'
10+
11+ jobs :
12+ build-and-deploy :
13+ if : github.ref == 'refs/heads/main'
14+ runs-on : ubuntu-latest
15+ permissions :
16+ contents : read
17+ deployments : write
18+
19+ steps :
20+ - name : Checkout code
21+ uses : actions/checkout@v4
22+
23+ - name : Setup Node.js
24+ uses : actions/setup-node@v4
25+ with :
26+ node-version : 20
27+ cache : npm
28+
29+ - name : Install dependencies
30+ run : |
31+ npm install
32+
33+ - name : Build frontend
34+ run : npm run build
35+
36+ - name : Deploy to Cloudflare Pages
37+ uses : cloudflare/wrangler-action@v3
38+ with :
39+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
40+ accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
41+ command : pages deploy out --project-name=deploystack-docs --branch=main
42+ gitHubToken : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Deploy Documentation Preview
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ comment :
7+ description : ' Deployment Documentation'
8+ required : false
9+ default : ' Manual preview deployment'
10+
11+ jobs :
12+ build-and-deploy :
13+ if : github.ref == 'refs/heads/prod'
14+ runs-on : ubuntu-latest
15+ permissions :
16+ contents : read
17+ deployments : write
18+
19+ steps :
20+ - name : Checkout code
21+ uses : actions/checkout@v4
22+
23+ - name : Setup Node.js
24+ uses : actions/setup-node@v4
25+ with :
26+ node-version : 20
27+ cache : npm
28+
29+ - name : Install dependencies
30+ run : |
31+ npm install
32+
33+ - name : Build frontend
34+ run : npm run build
35+
36+ - name : Deploy to Cloudflare Pages
37+ uses : cloudflare/wrangler-action@v3
38+ with :
39+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
40+ accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
41+ command : pages deploy out --project-name=deploystack-docs --branch=prod
42+ gitHubToken : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments