Documentation build #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Documentation build | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 1 * * *" | |
env: | |
MAIN_PYTHON_VERSION: '3.12' | |
DOCUMENTATION_CNAME: 'jubilant-adventure-4kp1jwo.pages.github.io' | |
jobs: | |
geometry-mesh: | |
uses: ./.github/workflows/geometry-mesh.yml | |
secrets: inherit | |
with: | |
doc-build: true | |
geometry-mesh-fluent: | |
uses: ./.github/workflows/geometry-mesh-fluent.yml | |
secrets: inherit | |
with: | |
doc-build: true | |
geometry-mechanical-dpf: | |
uses: ./.github/workflows/geometry-mechanical-dpf.yml | |
secrets: inherit | |
with: | |
doc-build: true | |
compile-docs: | |
runs-on: ubuntu-latest | |
needs: [geometry-mesh, geometry-mesh-fluent, geometry-mechanical-dpf] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
fetch-depth: 0 | |
- name: Set up Python ${{ env.MAIN_PYTHON_VERSION }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r doc/requirements.txt | |
- name: Download artifacts for geometry-mesh | |
uses: actions/download-artifact@v4 | |
with: | |
name: geometry-mesh-docs | |
path: doc/ | |
- name: Download artifacts for geometry-mesh-fluent | |
uses: actions/download-artifact@v4 | |
with: | |
name: geometry-mesh-fluent-docs | |
path: doc/ | |
- name: Download artifacts for geometry-mechanical-dpf | |
uses: actions/download-artifact@v4 | |
with: | |
name: geometry-mechanical-dpf-docs | |
path: doc/ | |
- name: Build the documentation | |
run: | | |
cd doc | |
make html | |
- name: Upload the documentation | |
uses: actions/upload-artifact@v4 | |
with: | |
name: documentation-html | |
path: doc/_build/html/ | |
publish-docs: | |
runs-on: ubuntu-latest | |
needs: compile-docs | |
steps: | |
- name: "Download the documentation artifact" | |
uses: actions/download-artifact@v4 | |
with: | |
name: documentation-html | |
path: doc | |
- name: List all files | |
run: ls -R . | |
- name: "Deploy documentation to gh-pages" | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
publish_dir: ./doc | |
commit_message: "DOC: update documentation" | |
github_token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
cname: ${{ env.DOCUMENTATION_CNAME }} | |
force_orphan: true |