Files
EagleCast/.github/workflows/github-pages.yml
T
h202-wq 66d9a033c9
publish-github-pages / deploy (push) Has been cancelled
EagleCast
2026-07-09 10:03:32 -04:00

45 lines
1.2 KiB
YAML

name: publish-github-pages
on:
push:
branches:
- master
paths:
- 'docs/**'
workflow_dispatch:
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install mkdocs-material
# Build the mkdocs documentation in the docs/publish/docs dir. This will be at (/docs)
# The -d (output) path is relative to the -f (source) path
- name: Build docs site
run: mkdocs build -f docs/docs/mkdocs.yml -d ../publish/docs
- name: Generate Swagger UI
uses: Legion2/swagger-ui-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
spec-file: ./docs/swagger/collections.yaml
output: ./docs/publish/docs/swagger
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./docs/publish
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'