-
Notifications
You must be signed in to change notification settings - Fork 36
45 lines (42 loc) · 1.2 KB
/
deploy-cloudflare.yml
File metadata and controls
45 lines (42 loc) · 1.2 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
name: Deploy to Cloudflare
on:
push:
branches:
- master
env:
NODE_VERSION: '14.x'
jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache Dependencies
uses: actions/cache@v2
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
- name: Install Dependencies
uses: pnpm/action-setup@v1.2.1
with:
version: 5.18.9
run_install: |
- recursive: true
args: [--frozen-lockfile]
- name: Build
run: pnpm build
- name: Deploy to Cloudflare
uses: cloudflare/wrangler-action@1.2.0
env:
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CF_ZONE_ID: ${{ secrets.CF_ZONE_ID }}
with:
apiToken: ${{ secrets.CF_API_TOKEN }}