bottom/.github/workflows/docs.yml
Clement Tsang a377e93ecc
ci: bump skip-duplicate-actions to v5.3.1 and setup-python to v5.0.0 (#1401)
* ci: bump skip-duplicate-actions to v5.3.1

* also bump setup-python to v5.0.0
2024-01-28 06:11:42 -05:00

45 lines
1.2 KiB
YAML

# Workflow to deploy mkdocs documentation.
name: docs
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "docs/**"
- ".github/workflows/docs.yml"
env:
# Assign commit authorship to official GitHub Actions bot when pushing to the `gh-pages` branch:
GIT_USER: "github-actions[bot]"
GIT_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
jobs:
build-documentation:
name: Build and deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: 3.11
- name: Install Python dependencies
run: pip install -r docs/requirements.txt
- name: Configure git user and email
run: |
git config --global user.name ${GIT_USER}
git config --global user.email ${GIT_EMAIL}
echo Name: $(git config --get user.name)
echo Email: $(git config --get user.email)
- name: Build and deploy docs with mike
run: |
cd docs
mike deploy nightly --push