name: Generate
on: workflow_dispatch

jobs:
  generate:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2

    - name: Prep git
      run: |
        git config --global user.name 'GitHub Action'
        git config --global user.name 'jonskeet@users.noreply.github.com'

    - name: Generate
      run: scripts/detect_changes.sh
      
    - name: Push
      if: hashFiles('tmp/gh-pages/*') != ''
      run: |
        git -C tmp/gh-pages remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
        git -C tmp/gh-pages push origin gh-pages

name: Generate
on: workflow_dispatch

jobs:
  generate:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2

    - name: Prep git
      run: |
        git config --global user.name 'GitHub Action'
        git config --global user.email 'jonskeet@users.noreply.github.com'

    - name: Generate
      run: scripts/detect_changes.sh
      
    - name: Push
      if: hashFiles('tmp/gh-pages/*') != ''
      run: |
        git -C tmp/gh-pages remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
        git -C tmp/gh-pages push origin gh-pages

Set user.email, not user.name twice
Set user.email, not user.name twice
