-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (66 loc) · 1.84 KB
/
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Deploy to Prod
on:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
env:
NODE_ENV: 'test'
ANNIE_API_BASE_URL: 'localhost:5000/api'
ANNIE_CLIENT_BASE_URL: 'localhost:3000'
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 18.x
- name: setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8.5.1
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Get pnpm store directory path
id: pnpm-store-dir-path
run: echo "::set-output name=dir::$(pnpm store dir)"
- uses: actions/cache@v2
id: annie-ci-cache
with:
path: ./*
key: ${{ github.sha }}
restore-keys: |
${{ runner.os }}-annie-
- name: Run test for Annie Web
run: pnpm test
build_deply:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 18.x
- name: setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8.5.1
- uses: actions/cache@v2
id: annie-ci-cache
with:
path: ./*
key: ${{ github.sha }}
restore-keys: |
${{ runner.os }}-annie-
- name: build
run: pnpm build
- name: Install Netlify CLI
run: pnpm install netlify-cli -g
- name: Disable telemetry
run: netlify --telemetry-disable
- name: Deploy to Netlify
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: netlify deploy --prod