Skip to content

Merge pull request #1 from Jarvl/build-action-fixes #12

Merge pull request #1 from Jarvl/build-action-fixes

Merge pull request #1 from Jarvl/build-action-fixes #12

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Publish to Github Pages
on:
push:
branches:
- main
env:
NODE_VERSION: '14.15.3'
jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Build app
run: |
npm install
npm run build
- name: 'Deploy to Github Pages'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public