-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (55 loc) · 1.46 KB
/
CD.yaml
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
name: CD (after merge to master)
on:
push:
branches:
- master
jobs:
deploy-website:
name: Deploy website to Github Pages
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
# Predictable node version. Going to node 18 build started to fail with some openssl provider error
- name: Use Node 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
- name: Install and Build 🔧
run: |
yarn
yarn workspace website run build
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: packages/website/build
clean-exclude: "-"
maybe-release-packages:
name: Release package(s) if needed
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Use Node 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
- name: Check NPM Auth 🔐
run: |
yarn npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install Dependencies 🔧
run: |
yarn
- name: Build 🔨
run: |
yarn run build:public
- name: Publish on NPM 📦
run: |
yarn run release:public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}