name: Publish docs

on:
  release:
    types: [published]
jobs:
  publish-docs:
    name: Publish docs to Netlify
    if: ${{ !github.event.release.prerelease }}
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          token: ${{ secrets.WEAVEWORKSBOT_TOKEN }}
          fetch-depth: 0
      - name: Trigger Netlify deployment
        run: make publish-docs
