-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (54 loc) · 1.75 KB
/
website-ui.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: 'WEBSITE UI CI'
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
# This workflow checks if the package has changed to trigger subsequent pipeline
check:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
outputs:
status: ${{ steps.early.conclusion }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checkout the source code
- name: 'Checkout source code'
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# Check for package changes
- name: Check for package changes
id: early
run: ./ci/check-package.sh "website-ui"
deploy:
name: 'Deploy'
runs-on: ubuntu-latest
needs: check
if: needs.check.outputs.status == 'success' && github.ref == 'refs/heads/master'
defaults:
run:
working-directory: ./packages/ui/website
steps:
- uses: netlify/actions/cli@master
- name: Check out code
uses: actions/checkout@v2
- name: Install packages
run: npm install
- name: Create env file
run: |
touch .env.production
echo GATSBY_RECAPTCHA_SITE_KEY=${{ secrets.RECAPTCHA_SITE_KEY }} >> .env.production
echo GATSBY_CORE_API_BASE_URL="https://api.telly.health" >> .env.production
- name: Build the package
run: npm run build
- name: Publish
run: netlify deploy --dir=public --prod --auth ${{ secrets.NETLIFY_SECRET }} --site ${{ secrets.WEBSITE_SITE_ID }}