Files
rocm-systems/projects/amdsmi/.github/workflows/generate-docs.yml
T
Park, Peter 83bbbd55a3 docs: Update Doxygen, Sphinx, and readthedocs configs (#719)
* conf: update RTD config to ub24.04 (doxygen 1.9.8) and py3.12
* update generate-docs workflow
* Update "modules" to "topics" due to Doxygen 1.9.8
* bump rocm-docs-core to 1.25.0 and pip-compile requirements.txt
* doxygen: fill in version string in Doxyfile from conf.py
* remove unneeded rocm-smi-lib tutorials
* remove wikipedia references in doxyfile to satisfy ci check

Signed-off-by: Park, Peter <Peter.Park@amd.com>

[ROCm/amdsmi commit: 311eade5b1]
2025-09-26 17:30:48 -05:00

84 строки
2.5 KiB
YAML

name: Generate Documentation
on:
pull_request:
branches: [amd-staging, amd-mainline, release/rocm-rel-*]
push:
branches: [amd-staging, amd-mainline, release/rocm-rel-*]
workflow_dispatch:
permissions:
contents: read
env:
DEBIAN_FRONTEND: noninteractive
DEBCONF_NONINTERACTIVE_SEEN: true
BUILD_TYPE: Release
jobs:
generate-docs:
name: Generate Documentation
runs-on: AMD-ROCm-Internal-dev1
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Get branch name for artifact naming
id: get_branch_info
run: |
BRANCH_NAME=""
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
BRANCH_NAME="${{ github.head_ref }}"
else
BRANCH_NAME="${{ github.ref_name }}"
fi
SANITIZED_NAME=$(echo "$BRANCH_NAME" | sed -e 's|/|-|g' -e 's|[^a-zA-Z0-9._-]||g' -e 's|^-*||' -e 's|-*$||')
if [[ -z "$SANITIZED_NAME" ]]; then
SANITIZED_NAME="docs-$(date +%s)"
fi
echo "sanitized_name=${SANITIZED_NAME}" >> $GITHUB_OUTPUT
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz
- name: Set Up Python Environment
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r docs/sphinx/requirements.txt
- name: Build Documentation
run: |
if [ ! -e "docs/.git" ]; then
if [ -d ".git" ]; then
ln -s ../.git docs/.git
fi
fi
cd docs
python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html
- name: Upload Documentation
uses: actions/upload-artifact@v4
with:
name: documentation-${{ steps.get_branch_info.outputs.sanitized_name }}
path: docs/_build/html/
- name: Generate Job Summary
run: |
cat >> $GITHUB_STEP_SUMMARY << 'EOF'
# 📚 Documentation Generated Successfully!
## 🚀 Quick Start
1. **📥 Download** the artifact `documentation-${{ steps.get_branch_info.outputs.sanitized_name }}`
2. **📂 Extract** the ZIP file
3. **🖱️ Double-click** `index.html`
4. **✅ Done!** Documentation opens with full formatting in your browser
EOF