docs: add automated compose documentation generation pipeline

This commit is contained in:
beatz174-bit
2026-05-13 07:45:57 +10:00
parent 5589594d2c
commit c0360a14b9
15 changed files with 256 additions and 0 deletions
+55
View File
@@ -0,0 +1,55 @@
name: Generate documentation
on:
push:
branches: [main]
paths-ignore:
- "docs/generated/**"
- "docs/diagrams/**"
- "docs/public/**"
pull_request:
branches: [main]
paths-ignore:
- "docs/generated/**"
- "docs/diagrams/**"
- "docs/public/**"
workflow_dispatch:
inputs:
commit_generated_docs:
description: "Commit generated docs back to the branch"
required: false
default: "false"
type: choice
options: ["false", "true"]
permissions:
contents: write
jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install tooling
run: |
sudo apt-get update
sudo apt-get install -y docker-compose-plugin graphviz jq python3 python3-pip
python3 -m pip install --user pyyaml jinja2
- name: Generate documentation
run: |
chmod +x scripts/docs/*.sh
scripts/docs/generate-all.sh
- name: Upload generated documentation
uses: actions/upload-artifact@v4
with:
name: generated-documentation
path: |
docs/generated
docs/diagrams
docs/public
- name: Commit generated docs
if: github.event_name == 'workflow_dispatch' && inputs.commit_generated_docs == 'true'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "docs: regenerate environment documentation"
file_pattern: docs/generated docs/diagrams docs/public