Skip to content

Basic mkdocs website with github action deploy #1

Basic mkdocs website with github action deploy

Basic mkdocs website with github action deploy #1

Workflow file for this run

---
name: Deploy MKDocs to GitHub Pages
# yamllint disable-line rule:truthy
on:
push:
branches:
- klaas-2024-*
env:
DEFAULT_PYTHON: "3.11"
jobs:
build-docs:
name: Build documentation
runs-on: ubuntu-latest
steps:
- name: ‡️ Check out code from GitHub
uses: actions/[email protected]
- name: πŸ— Set up Poetry
run: pipx install poetry
- name: πŸ— Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/[email protected]
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: "poetry"
- name: πŸ— Install workflow dependencies
run: |
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: πŸ— Install dependencies
run: poetry install --no-interaction
- name: πŸ— Build the site
run: poetry run mkdocs build
- name: ⬆️ Upload pages artifacts
uses: actions/[email protected]
with:
path: site
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: build-docs
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: πŸ—οΈ Setup Github Pages
uses: actions/[email protected]
- name: πŸš€ Deploy to Github Pages
uses: actions/[email protected]
id: deployment