-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (41 loc) · 1.18 KB
/
staging.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Lint, Build, and Deploy (Staging)
on:
push:
branches:
- staging
jobs:
build:
timeout-minutes: 10
env:
CI: 'true'
SITE_ENV: 'staging'
DEPLOY_URL: 'https://dat.coolkidscomputerclub.workers.dev/'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Configure NPM
run: |
echo "//npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN" > .npmrc
echo '@saulhardman:registry=https://npm.pkg.github.com' >> .npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- name: Install Dependencies
uses: bahmutov/npm-install@v1
- name: Lint Source Files
run: yarn lint
- name: Run Static Site Generator (Staging)
run: yarn build
env:
NODE_ENV: production
- name: Deploy to Cloudflare (Staging)
env:
CF_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
npx -p @cloudflare/wrangler wrangler publish --env staging