Skip to content

GitHub Pages Deployment #15

GitHub Pages Deployment

GitHub Pages Deployment #15

# .github/workflows/build-and-deploy.yml
name: GitHub Pages Deployment
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v3
# a standard step for GitHub actions on Node
# https://github.com/actions/setup-node
- uses: actions/setup-node@v3
with:
# update the Node version to meet your needs
node-version: 16
cache: npm
cache-dependency-path: ./editor-app
- name: Build
working-directory: ./editor-app
run: |
npm i yarn
yarn install
yarn build
touch out/.nojekyll
- name: Deploy
# https://github.com/JamesIves/github-pages-deploy-action
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: editor-app/out