added package settings to allow gh pages deploy, refactored sample js… #20
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
name: Test, Build and Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- "main" | |
jobs: | |
test_app: | |
name: Testing Utils and React App | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [15.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Run tests | |
run: cd web-app && npm i && npm test | |
deploy_react: | |
name: Deploy React app | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [15.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install and build | |
run: cd web-app && npm install && npm run build | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: web-app/build |