-
Notifications
You must be signed in to change notification settings - Fork 16
56 lines (44 loc) · 1.4 KB
/
publish-demo-app.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
name: Publish Demo App
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build_and_publish:
name: Build and Publish Demo App
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare NodeJS
uses: actions/setup-node@v3
with:
node-version: 16.x
# Get yarn cache directory path
- name: Get Yarn Cache Path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
# Node module and yarn cache
- name: Yarn Cache
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-harlem-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-harlem-
- name: Install Dependencies
run: yarn install
- name: Build Harlem Packages
run: yarn build
- name: Build App
run: cd app && yarn build --base "/harlem/"
# please check out the docs of the workflow for more details
# @see https://github.com/crazy-max/ghaction-github-pages
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v3
with:
target_branch: demo
build_dir: app/dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}