Skip to content

Commit

Permalink
add docs workflow to publish docs on github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
amorison committed Apr 15, 2024
1 parent fa9dc17 commit c05f8ef
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: docs

on:
push:
branches:
- master
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches:
- master
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- uses: actions/setup-python@v5
with:
python-version: 3.12
- run: python3 -m pip install -U pip
- run: python3 -m pip install -r docs/requirements.txt
- run: python3 -m pip install .
- run: mkdocs build --strict -d site
env:
STAGPY_DOC_CONFIG: 1
- uses: actions/upload-pages-artifact@v3
with:
path: "site/"

deploy:
needs: build
if: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v') }}
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/deploy-pages@v4
id: deployment

0 comments on commit c05f8ef

Please sign in to comment.