name: Publish

on:
  push:
    branches: [ master ]
    paths:
    - '**.md'
    - '**.yml'
    - '**.swift'

jobs:
  publish:
    if: "!contains(format('{0} {1} {2}', github.event.head_commit.message, github.event.pull_request.title, github.event.pull_request.body), '[skip ci]')"
    runs-on: macos-latest
    steps:
    - uses: actions/checkout@v2
    - name: Build
      run: swift build -v
    - name: Generate
      run: swift run -v Publisher
    - name: Move Files
      run: |
        rm -Rf docs
        cp -R Output/* .
        rm -Rf Output
    - name: Commit files
      run: |
        git config --local user.email "publish.bot@ryanjdavies.com"
        git config --local user.name "Publish Bot"
        git add -A
        git commit -m "Publish deploy"
    - name: Push changes
      uses: ad-m/github-push-action@master
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}

name: Publish

on:
  push:
    branches: [ master ]
    paths:
    - '**.md'
    - '**.yml'
    - '**.swift'
    - 'Content/**'

jobs:
  publish:
    if: "!contains(format('{0} {1} {2}', github.event.head_commit.message, github.event.pull_request.title, github.event.pull_request.body), '[skip ci]')"
    runs-on: macos-latest
    steps:
    - uses: actions/checkout@v2
    - name: Build
      run: swift build -v
    - name: Generate
      run: swift run -v Publisher
    - name: Move Files
      run: |
        rm -Rf docs
        cp -R Output/* .
        rm -Rf Output
    - name: Commit files
      run: |
        git config --local user.email "publish.bot@ryanjdavies.com"
        git config --local user.name "Publish Bot"
        git add -A
        git commit -m "Publish deploy"
    - name: Push changes
      uses: ad-m/github-push-action@master
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}

Deploy on all content changes
Deploy on all content changes