[docs] publish MkDocs site from Forgejo Actions
Some checks failed
Publish Docs / publish-docs (push) Has been cancelled
Some checks failed
Publish Docs / publish-docs (push) Has been cancelled
This commit is contained in:
parent
a82eb5858a
commit
f52bf20dd5
4 changed files with 123 additions and 1 deletions
57
.forgejo/workflows/docs.yml
Normal file
57
.forgejo/workflows/docs.yml
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
name: Publish Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- ".forgejo/workflows/docs.yml"
|
||||
- "README.md"
|
||||
- "make_docs.sh"
|
||||
- "mkdocs.yml"
|
||||
- "pyproject.toml"
|
||||
- "docs/**"
|
||||
- "meanas/**"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
publish-docs:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: python:3.13-bookworm
|
||||
env:
|
||||
DOCS_SITE_URL: ${{ vars.DOCS_SITE_URL }}
|
||||
steps:
|
||||
- name: Check out the repository
|
||||
uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends git
|
||||
|
||||
- name: Install docs dependencies
|
||||
run: |
|
||||
pip install -e '.[docs]'
|
||||
|
||||
- name: Build documentation
|
||||
run: |
|
||||
./make_docs.sh
|
||||
|
||||
- name: Publish docs branch
|
||||
run: |
|
||||
./scripts/publish_docs_branch.sh site docs-site
|
||||
|
||||
- name: Write job summary
|
||||
run: |
|
||||
{
|
||||
echo "## Published docs"
|
||||
echo
|
||||
echo "- Branch: \`docs-site\`"
|
||||
if [[ -n "${DOCS_SITE_URL:-}" ]]; then
|
||||
echo "- URL: ${DOCS_SITE_URL}"
|
||||
else
|
||||
echo "- URL: set the \`DOCS_SITE_URL\` repository variable to advertise the published site"
|
||||
fi
|
||||
echo "- Recommended repository setting: configure the Wiki tab to point at the published docs URL"
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
Loading…
Add table
Add a link
Reference in a new issue