-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5fac3f
commit 217d58f
Showing
10 changed files
with
63 additions
and
69 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 |
---|---|---|
|
@@ -16,6 +16,7 @@ env: | |
PYANSYS_OFF_SCREEN: True | ||
DOCKER_PACKAGE: ghcr.io/pyansys/pymapdl/mapdl | ||
DOCKER_IMAGE_VERSION_DOCS_BUILD: v22.2.0 | ||
DOCUMENTATION_CNAME: "mapdl.docs.pyansys.com" | ||
# Following env vars when changed will "reset" the mentioned cache, | ||
# by changing the cache file name. It is rendered as ...-v%RESET_XXX%-... | ||
# You should go up in number, if you go down (or repeat a previous value) | ||
|
@@ -117,15 +118,6 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# used for documentation deployment | ||
- name: Get Bot Application Token | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | ||
id: get_workflow_token | ||
uses: peter-murray/workflow-application-token-action@v1 | ||
with: | ||
application_id: ${{ secrets.BOT_APPLICATION_ID }} | ||
application_private_key: ${{ secrets.BOT_APPLICATION_PRIVATE_KEY }} | ||
|
||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -186,7 +178,7 @@ jobs: | |
- name: Cache docs build directory | ||
uses: actions/cache@v3 | ||
with: | ||
path: doc/build | ||
path: doc/_build | ||
key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ steps.version.outputs.PYMAPDL_VERSION }}-${{ github.sha }} | ||
restore-keys: | | ||
doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ steps.version.outputs.PYMAPDL_VERSION }} | ||
|
@@ -201,43 +193,28 @@ jobs: | |
- name: Install Docs Build Requirements | ||
run: | | ||
pip install -r requirements/requirements_docs.txt | ||
pip install -r requirements/requirements_doc.txt | ||
- name: Build Documentation | ||
run: | | ||
xvfb-run make -C doc html SPHINXOPTS="-j auto -W --keep-going" | ||
- name: Zip documentation | ||
run: | | ||
cd doc/build/html | ||
zip -r PyMAPDL_documentation.zip * | ||
- name: Upload HTML Documentation | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: HTML-Documentation | ||
path: doc/build/html/PyMAPDL_documentation.zip | ||
name: documentation-html | ||
path: doc/_build/html | ||
retention-days: 7 | ||
|
||
- name: Deploy | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | ||
uses: JamesIves/[email protected] | ||
with: | ||
repository-name: pyansys/pymapdl-docs | ||
token: ${{ steps.get_workflow_token.outputs.token }} | ||
branch: gh-pages | ||
folder: doc/build/html | ||
clean: true | ||
|
||
- name: Build PDF Documentation | ||
working-directory: doc | ||
run: make pdf | ||
|
||
- name: Upload PDF Documentation | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: PDF-Documentation | ||
path: doc/build/latex/pymapdl*.pdf | ||
name: documentation-pdf | ||
path: doc/_build/latex/pymapdl*.pdf | ||
retention-days: 7 | ||
|
||
- name: Display files structure | ||
|
@@ -266,7 +243,7 @@ jobs: | |
- name: Tar logs | ||
if: always() | ||
run: | | ||
cp -f doc/build/latex/*.log ./logs-build-docs/ | ||
cp -f doc/_build/latex/*.log ./logs-build-docs/ | ||
cp log.txt ./logs-build-docs/ | ||
tar cvzf ./logs-build-docs.tgz ./logs-build-docs | ||
|
@@ -284,7 +261,7 @@ jobs: | |
- name: List main files | ||
if: always() | ||
run: | | ||
if compgen -G 'doc/build/latex/*.log' > /dev/null ;then for f in doc/build/latex/*.log; do echo "::group:: Output latex log file $f" && cat $f && echo "::endgroup::" ; done; fi | ||
if compgen -G 'doc/_build/latex/*.log' > /dev/null ;then for f in doc/_build/latex/*.log; do echo "::group:: Output latex log file $f" && cat $f && echo "::endgroup::" ; done; fi | ||
if compgen -G './logs-build-docs/*.err' > /dev/null ;then for f in ./logs-build-docs/*.err; do echo "::group:: Error file $f" && cat $f && echo "::endgroup::" ; done; fi | ||
if compgen -G './logs-build-docs/*.log' > /dev/null ;then for f in ./logs-build-docs/*.log; do echo "::group:: Log file $f" && cat $f && echo "::endgroup::" ; done; fi | ||
if compgen -G './logs-build-docs/*.out' > /dev/null ;then for f in ./logs-build-docs/*.out; do echo "::group:: Output file $f" && cat $f && echo "::endgroup::" ; done; fi | ||
|
@@ -454,3 +431,17 @@ jobs: | |
overwrite: "{ | ||
title: `Release FAILED!`, | ||
}" | ||
|
||
upload_docs_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: pyansys/actions/doc-deploy-stable@v2 | ||
with: | ||
cname: ${{ env.DOCUMENTATION_CNAME }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
python-version: '3.10' | ||
|
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 |
---|---|---|
|
@@ -19,14 +19,6 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# used for documentation deployment | ||
- name: Get Bot Application Token | ||
id: get_workflow_token | ||
uses: peter-murray/workflow-application-token-action@v1 | ||
with: | ||
application_id: ${{ secrets.BOT_APPLICATION_ID }} | ||
application_private_key: ${{ secrets.BOT_APPLICATION_PRIVATE_KEY }} | ||
|
||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -65,15 +57,6 @@ jobs: | |
pip install -r requirements/requirements_docs.txt | ||
xvfb-run make -C doc html | ||
- name: Deploy | ||
uses: JamesIves/[email protected] | ||
with: | ||
repository-name: pyansys/pymapdl-dev-docs | ||
token: ${{ steps.get_workflow_token.outputs.token }} | ||
BRANCH: gh-pages | ||
FOLDER: doc/build/html | ||
CLEAN: true | ||
|
||
- name: Display files structure | ||
if: always() | ||
run: | | ||
|
@@ -133,4 +116,4 @@ jobs: | |
steps: ${{ toJson(steps) }} | ||
overwrite: "{ | ||
title: `${workflow} failed.`, | ||
}" | ||
}" |
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
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
Binary file not shown.
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
2 changes: 1 addition & 1 deletion
2
requirements/requirements_docs.txt → requirements/requirements_doc.txt
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