31 lines
862 B
YAML
31 lines
862 B
YAML
name: Docs
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
permissions: {}
|
|
jobs:
|
|
build_and_publish:
|
|
permissions:
|
|
contents: write # to push changes in repo (jamesives/github-pages-deploy-action)
|
|
|
|
name: Build and publish Docs
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'PHPMailer/PHPMailer'
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
|
with:
|
|
fetch-depth: 1
|
|
persist-credentials: false
|
|
- name: Build Docs
|
|
uses: ./.github/actions/build-docs
|
|
- name: Publish Docs to gh-pages
|
|
uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8 # v4.7.3
|
|
with:
|
|
branch: gh-pages
|
|
folder: docs
|
|
env:
|
|
BUILD_DIR: docs/
|
|
GH_PAT: ${{ secrets.GH_PAT }}
|