generated from kimyvgy/worker-typescript-template
-
-
Notifications
You must be signed in to change notification settings - Fork 6
32 lines (30 loc) · 843 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
name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy to Cloudflare Workers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version: '16.x'
- name: ⎔ Cache node_modules
uses: actions/cache@v3
env:
cache-name: node_modules-16x
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}
- name: 📥 Download deps
run: yarn install --frozen-lockfile
- name: 🧶 Publish worker to Cloudflare
uses: cloudflare/wrangler-action@v3.4.1
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: publish --env production