Skip to content

Commit

Permalink
config for mkdocs build via github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
JTB committed Jan 23, 2025
1 parent 9c617be commit fe28320
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build_versioned_mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: MkDocs Build
on:
push:
branches:
- documentation
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write

jobs:
build_mkdocs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.9
- run: pip install mkdocs mkdocs-material mkdocstrings "mkdocstrings[python]"
- run: mkdocs gh-deploy --force

deploy_mkdocs:
needs: build_mkdocs
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit fe28320

Please sign in to comment.