generated from BetaHuhn/cf-worker-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 21
33 lines (30 loc) · 849 Bytes
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Deploy CI
on:
release:
types: [created]
workflow_dispatch:
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Cache node modules
uses: c-hive/gha-npm-cache@v1
- name: Install dependencies
run: npm ci
- name: Generate wrangler.toml
run: npm run generate
env:
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CF_KV_NAMESPACE_REDIRECT_KV: ${{ secrets.CF_KV_NAMESPACE_REDIRECT_KV }}
CF_WORKERS_DEV: true
- name: Publish to Cloudflare with Wrangler
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CF_API_TOKEN }}