# from https://github.com/PHPMailer/PHPMailer

on:
  push:
    branches:
      - main

name: "Docs"

jobs:
  build_and_publish:
    name: "Build and publish Docs"
    runs-on: ubuntu-latest

    steps:
      - name: "Checkout sources"
        uses: actions/checkout@v2
        with:
          fetch-depth: 1

      - name: "Build Docs"
        uses: ./.github/actions/build-docs

      - name: "Publish Docs to gh-pages"
        uses: maxheld83/ghpages@v0.3.0
        env:
          BUILD_DIR: docs/
          GH_PAT: ${{ secrets.GH_PAT }}
