Merge pull request #15 from mnzpk/mnz/build #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and deploy it to gh-pages. | |
# This is so that we can get the build files on ToolForge by pulling the gh-pages branch. | |
name: Node.js CI | |
on: | |
push: | |
branches: main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./client | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14.x | |
- name: Install dependencies | |
run: npm ci | |
- name: Build project | |
run: npm run build --if-present | |
env: | |
CI: false | |
- name: Deploy to gh-pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./client/build |