Skip to content

CI: add a workflow to deploy documentation to GitHub Pages #1

CI: add a workflow to deploy documentation to GitHub Pages

CI: add a workflow to deploy documentation to GitHub Pages #1

name: Deploy Material for MkDocs documentation to GitHub Pages
env:
AZURE_WEBAPP_NAME: st-undp
PYTHON_VERSION: '3.11'
on:
push:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Set up Python version
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
poetry config virtualenvs.create false
poetry install --only docs
- name: Deploy to GitHub Pages
run: mkdocs gh-deploy --force