Files
gitea-pages/.gitea/workflows/deploy.yml
Krisztian Pozsa bc1bf1e1c8
All checks were successful
Lint markdown files / run-markdownlint (pull_request) Successful in 3s
Build and deploy documentation / build-and-deploy-docs (push) Successful in 8s
Add mkdocs setup
2025-09-17 11:16:45 +02:00

34 lines
976 B
YAML

---
name: Build and deploy documentation
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-deploy-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure git credentials
run: |
git config --global user.name "Gitea Actions"
git config --global user.email "actions@gitea.local"
- uses: actions/setup-python@v5
with:
python-version: "3"
- name: Install mkdocs-material
run: pip install mkdocs-material=="9.*"
- name: Build documentation
run: mkdocs build
- name: Deploy documentation
# the default mkdocs build output directory `/site` is gitignored
# so it's safe to `git rm -rf .`
run: |
git checkout --orphan gitea-pages
git rm -rf .
cp -r site/* .
git add .
git commit -m "Deploy documentation"
git push --force origin gitea-pages