name: Deploy on GitHub Pages

on: 
  push:
    branches:
     - master

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Use Node.js
        uses: actions/setup-node@v1
        with:
          node-version: '12.x'

      - name: NPM install, build and deploy
        env:
            GH_TOKEN: ${{ secrets.GH_TOKEN }}
            NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
        run: |
          npm ci
          npm run build -- --prod
          npm run deploy -- --no-silent --name="<%= botName %>" --email=<%= botEmail %>
