-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: enable multidocs * fix: rename requirements_doc file * feat: enable PDF build * feat: disable Python cache * fiz: change build-dir * feat: install pandoc * fix: skip deps cache
- Loading branch information
Showing
4 changed files
with
59 additions
and
44 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ env: | |
PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners | ||
PYMAPDL_START_INSTANCE: FALSE | ||
DOCKER_PACKAGE: ghcr.io/pyansys/pymapdl/mapdl | ||
DOCUMENTATION_CNAME: reader.docs.pyansys.com | ||
|
||
on: | ||
pull_request: | ||
|
@@ -24,55 +25,30 @@ concurrency: | |
|
||
jobs: | ||
doc_build: | ||
name: Build Documentation | ||
name: Build documentation | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Setup headless display | ||
uses: pyvista/setup-headless-display-action@v2 | ||
|
||
- name: Install ansys-mapdl-reader | ||
run: | | ||
pip install -e . | ||
cd tests/ | ||
python -c "from ansys.mapdl import reader as pymapdl_reader; print(pymapdl_reader.Report())" | ||
- name: Install OS packages | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install zip pandoc -qy | ||
- name: Build Documentation | ||
run: | | ||
pip install -r requirements/requirements_docs.txt --disable-pip-version-check | ||
make -C doc html | ||
cd doc/build/html/ | ||
zip -r ../../../${{ env.PACKAGE_NAME }}-HTML.zip ./* | ||
- name: Upload | ||
uses: actions/upload-artifact@v3 | ||
- name: Build project documentation | ||
uses: ansys/actions/doc-build@v4 | ||
with: | ||
name: ${{ env.PACKAGE_NAME }}-Documentation | ||
path: | | ||
${{ env.PACKAGE_NAME }}-HTML.zip | ||
doc/build/latex/*.pdf | ||
retention-days: 7 | ||
dependencies: 'pandoc' | ||
skip-dependencies-cache: true | ||
use-python-cache: false | ||
python-version: "3.10" | ||
|
||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
doc-deploy-dev: | ||
name: Upload development documentation | ||
runs-on: ubuntu-latest | ||
needs: [doc_build] | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- uses: ansys/actions/doc-deploy-dev@v4 | ||
with: | ||
cname: ${{ env.DOCUMENTATION_CNAME }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages | ||
folder: doc/build/html | ||
clean: true | ||
|
||
build: | ||
name: Build and Test | ||
|
@@ -262,6 +238,12 @@ jobs: | |
- name: Display structure of downloaded files | ||
run: ls -R | ||
|
||
- name: Compressing HTML documentation | ||
uses: vimtor/[email protected] | ||
with: | ||
files: documentation-html | ||
dest: documentation-html.zip | ||
|
||
- name: Upload to Public PyPi | ||
run: | | ||
pip install twine | ||
|
@@ -279,3 +261,15 @@ jobs: | |
./**/*.whl | ||
./**/*.zip | ||
doc-deploy-release: | ||
name: Upload release documentation | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | ||
runs-on: ubuntu-latest | ||
needs: [Release] | ||
steps: | ||
- name: Deploy the stable documentation | ||
uses: ansys/actions/doc-deploy-stable@v4 | ||
with: | ||
cname: ${{ env.DOCUMENTATION_CNAME }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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
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
File renamed without changes.