name: Build and publish app when tag is pushed

on:
  push:
    tags: v[1-9]+.[0-9]+.[0-9]+
    branches: master

jobs:
  build:
    name: Install, test, build and deploy
    runs-on: ubuntu-latest
    steps:

      - name: Install NodeJS
        uses: actions/setup-node@v2
        with:
          node-version: '14'

      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Install dependencies
        run: npm ci

      - name: Run tests
        run: npm run test-all

      - name: Build App
        run: npm run build

      - name: Deploy to branch gh-pages
        if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
        uses: JamesIves/github-pages-deploy-action@4.0.0
        with:
          branch: gh-pages
          folder: build

Add GitHub actions workflow for GH Pages
Add GitHub actions workflow for GH Pages
