name: Documentation Site
concurrency:
  cancel-in-progress: true
  group: "publish-site"

defaults:
  run:
    shell: bash

on:
  workflow_dispatch:
    branches: [ 'master', 'main' ]

jobs:
  site:
    name: Publish Site
    runs-on: ubuntu-latest
    steps:
      - name: Checkout current branch (full)
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - run: "build/publish_docs.sh"
        env:
          SBT_MICROSITES_PUBLISH_TOKEN: ${{ secrets.VINYLDNS_MICROSITE }}
          ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
