Skip to content

docs: restructure duplicated content #1541

docs: restructure duplicated content

docs: restructure duplicated content #1541

Workflow file for this run

name: CI
on:
pull_request:
push:
tags:
- "*"
branches:
- main
env:
MAIN_PYTHON_VERSION: '3.14'
DOCUMENTATION_CNAME: 'dev.docs.pyansys.com'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
doc-style:
name: "Check documentation style"
runs-on: ubuntu-latest
steps:
- name: "Check documentation style"
uses: ansys/actions/doc-style@12ca08fd7f0caa52076cca15c5621482646f8560 # v10.3.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
doc-build:
name: "Build project documentation"
runs-on: ubuntu-22.04
steps:
- name: Setup headless display
uses: pyvista/setup-headless-display-action@5bc8de3bc71fcda7a96439571287a554901541a0 # v4.3
- name: "Install mermaid-cli"
run: npm install -g @mermaid-js/mermaid-cli
- name: "Install GraphViz"
shell: bash
run: |
sudo apt-get update
sudo apt-get install graphviz
- name: "Build project documentation"
uses: ansys/actions/doc-build@12ca08fd7f0caa52076cca15c5621482646f8560 # v10.3.1
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
use-python-cache: false
skip-install: true
dependencies: 'texlive-latex-extra latexmk nodejs npm'
doc-deploy-pr:
name: "Deploy PR documentation"
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
needs: doc-build
steps:
- uses: ansys/actions/doc-deploy-pr@12ca08fd7f0caa52076cca15c5621482646f8560 # v10.3.1
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
doc-deploy:
name: "Deploy documentation"
runs-on: ubuntu-latest
if: github.event_name == 'push' && !contains(github.ref, 'refs/tags')
needs: doc-build
steps:
- name: "Download HTML documentation artifacts"
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: documentation-html
path: documentation-html
- uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: documentation-html
cname: ${{ env.DOCUMENTATION_CNAME }}
full_commit_message: ${{ github.event.head_commit.message }}
force_orphan: true
release-github:
name: "Release to GitHub"
runs-on: ubuntu-latest
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
needs: doc-build
steps:
- name: "Download HTML documentation"
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: documentation-html
path: documentation-html
- name: "Zip HTML documentation"
uses: vimtor/action-zip@5f1c4aa587ea41db1110df6a99981dbe19cee310 # v1
with:
files: documentation-html
dest: documentation-html.zip
- name: "Download PDF documentation"
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: documentation-pdf
path: documentation-pdf
- name: "Zip PDF documentation"
uses: vimtor/action-zip@5f1c4aa587ea41db1110df6a99981dbe19cee310 # v1
with:
files: documentation-pdf
dest: documentation-pdf
- name: "Display the structure of downloaded files"
shell: bash
run: ls -R
- name: "Release to GitHub"
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
with:
files: |
documentation-html.zip
documentation-pdf
doc-deploy-github-release:
name: "Deploy documentation (stable)"
runs-on: ubuntu-latest
needs: [release-github]
steps:
- name: "Download HTML documentation artifacts"
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: documentation-html
path: documentation-html
- uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: documentation-html
cname: ${{ env.DOCUMENTATION_CNAME }}
full_commit_message: ${{ github.event.head_commit.message }}
force_orphan: true