name: Build and deploy on GitHub Pages

on:
  push:
    branches:
      - source
  pull_request:
    branches:
      - source
  schedule:
    - cron: '0 3 1 * *' # monthly

jobs:
  build:
    name: Build and deploy on GitHub Pages
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Reconfigure git to use HTTP authentication
        # see https://github.com/actions/setup-node/issues/214#issuecomment-810829250 for why this is needed
        run: >
          git config --global url."https://github.com/".insteadOf
          ssh://git@github.com/
      - name: Use Node.js
        uses: actions/setup-node@v1
        with:
          node-version: 12.x
      - name: Install NPM dependencies
        run: npm ci
      - name: Check formatting using Prettier
        run: npm run prettier-check
      - name: Check Dependency Cruiser rules
        run: npm run depcruise-check
      - name: Build
        run: npm run build
      - name: Deploy
        uses: JamesIves/github-pages-deploy-action@releases/v3
        if: ${{ github.event_name == 'push' }}
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          BRANCH: gh-pages
          FOLDER: build
name: Build and deploy on GitHub Pages

on:
  push:
    branches:
      - source
  pull_request:
    branches:
      - source
  schedule:
    - cron: '0 3 1 * *' # monthly

jobs:
  build:
    name: Build and deploy on GitHub Pages
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Reconfigure git to use HTTP authentication
        # see https://github.com/actions/setup-node/issues/214#issuecomment-810829250 for why this is needed
        run: >
          git config --global url."https://github.com/".insteadOf
          ssh://git@github.com/
      - name: Use Node.js
        uses: actions/setup-node@v2
        with:
          node-version: 12.x
      - name: Install NPM dependencies
        run: npm ci
      - name: Check formatting using Prettier
        run: npm run prettier-check
      - name: Check Dependency Cruiser rules
        run: npm run depcruise-check
      - name: Build
        run: npm run build
      - name: Deploy
        uses: JamesIves/github-pages-deploy-action@releases/v3
        if: ${{ github.event_name == 'push' }}
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          BRANCH: gh-pages
          FOLDER: build
Update actions/setup-node action to v2
Update actions/setup-node action to v2
