on:
  push:
    branches:
      - dev
      - upgrades

jobs:
  build:
    name: Publish
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: "14"
          cache: "npm"

      - name: Install dependencies
        run: npm install

      - name: Build application
        run: npm run build

      - name: Stage build artifacts
        run: |
          git add -f index.html
          git add -f css/
          git add -f js/
          git add -f br/
          git status

      - name: Make commit message
        run: |
          git config --global user.name "GitHub Actions"
          git commit -m "Deployed build artifacts (`date '+%F %T %Z'`)" || true
          git restore .

      - name: Push build artifacts to gh-pages branch
        run: git push origin HEAD:gh-pages --force

on:
  push:
    branches:
      - dev

jobs:
  build:
    name: Publish
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: "14"
          cache: "npm"

      - name: Install dependencies
        run: npm install

      - name: Build application
        run: npm run build

      - name: Stage build artifacts
        run: |
          git add -f index.html
          git add -f css/
          git add -f js/
          git add -f br/
          git status

      - name: Make commit message
        run: |
          git config --global user.name "GitHub Actions"
          git commit -m "Deployed build artifacts (`date '+%F %T %Z'`)" || true
          git restore .

      - name: Push build artifacts to gh-pages branch
        run: git push origin gh-pages --force

Remove upgrades branch from job triggers
Remove upgrades branch from job triggers
