forked from reach/reach-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (62 loc) · 1.77 KB
/
ci.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
name: CI
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node 14
uses: actions/setup-node@v1
with:
version: 14.x
- name: Restore Lerna (Cache)
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
run: yarn --frozen-lockfile
- name: Build Packages
run: yarn build
- name: Run Tests
run: yarn test
# TODO: Create separate workflow for website
# website:
# name: Deploy Website
# runs-on: ubuntu-latest
# env:
# ENCRYPTED_KEY: ${{ secrets.ENCRYPTED_KEY }}
# ENCRYPTED_IV: ${{ secrets.ENCRYPTED_IV }}
# if: ${{ github.ref == 'refs/heads/website' }}
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - name: Restore Lerna (Cache)
# uses: actions/cache@v2
# with:
# path: |
# node_modules
# */*/node_modules
# key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
# - name: Checkout
# run: yarn --frozen-lockfile
# - name: Build Packages
# run: yarn build
# - run: echo "Deploying website to https://reach.tech/"
# - run: openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in website-deploy-key.enc -out website-deploy-key -d
# - run: chmod 600 website-deploy-key
# - run: eval $(ssh-agent -s)
# - run: ssh-add website-deploy-key
# - run: bash scripts/deploy-website.sh