Skip to content

v3.1.8

v3.1.8 #123

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 }}