forked from vtstats/web
-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (51 loc) · 1.4 KB
/
web-prod.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
54
55
56
57
58
59
60
61
62
63
64
name: Web Prod
on:
push:
branches:
- master
paths:
- web/**
- .github/workflows/web-prod.yml
defaults:
run:
working-directory: web
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Cache
uses: actions/cache@v1
with:
path: web/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Use Node 12
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install dependencies
run: yarn install --prefer-offline
- name: Run Prettier
run: yarn prettier --check --ignore-path .gitignore 'src/**/*.{ts,js,json.html,scss}'
- name: Build
run: |
sed -i "s/GIT_COMMIT_HASH/$(git rev-parse --short HEAD)/" src/environments/*
yarn build --prod
- name: Setup playwright
uses: microsoft/playwright-github-action@v1
- name: Run e2e
continue-on-error: true
run: |
node e2e/server.js &
yarn e2e
- name: Build workers
run: yarn tsc -P workers/tsconfig.json
- name: Deploy
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
workingDirectory: web
environment: prod
wranglerVersion: 1.15.1