From fe2832037750714259659ce14cd0ca1704b210aa Mon Sep 17 00:00:00 2001 From: JTB Date: Thu, 23 Jan 2025 13:59:21 -0800 Subject: [PATCH] config for mkdocs build via github actions --- .github/workflows/build_versioned_mkdocs.yml | 46 ++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build_versioned_mkdocs.yml diff --git a/.github/workflows/build_versioned_mkdocs.yml b/.github/workflows/build_versioned_mkdocs.yml new file mode 100644 index 0000000..777477d --- /dev/null +++ b/.github/workflows/build_versioned_mkdocs.yml @@ -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