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
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+
20+ - name : Setup Node
21+ uses : actions/setup-node@v4
22+ with :
23+ node-version : 22
24+ cache : npm
25+
26+ - name : Install dependencies
27+ run : npm ci
28+
29+ - name : Build
30+ run : npm run build
31+
32+ deploy :
33+ needs : build
34+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
35+ runs-on : ubuntu-latest
36+ permissions :
37+ contents : read
38+ deployments : write
39+ steps :
40+ - name : Checkout
41+ uses : actions/checkout@v4
42+
43+ - name : Setup Node
44+ uses : actions/setup-node@v4
45+ with :
46+ node-version : 22
47+ cache : npm
48+
49+ - name : Install dependencies
50+ run : npm ci
51+
52+ - name : Build
53+ run : npm run build
54+
55+ - name : Deploy to Cloudflare Workers
56+ uses : cloudflare/wrangler-action@v3
57+ with :
58+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments