generated from ansys/template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: deploy to stable and latest doc repos
- Loading branch information
1 parent
39eec01
commit fbb0166
Showing
1 changed file
with
46 additions
and
2 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 |
---|---|---|
|
@@ -149,7 +149,8 @@ jobs: | |
python -m pip install --upgrade pip tox | ||
- name: Generate the documentation with tox | ||
run: tox -e doc | ||
run: | | ||
tox -e doc | ||
- name: Upload documentation as artifact | ||
uses: actions/upload-artifact@v3 | ||
|
@@ -194,7 +195,7 @@ jobs: | |
path: dist/ | ||
retention-days: 7 | ||
|
||
release: | ||
release_pkg: | ||
name: Release project | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | ||
needs: [build] | ||
|
@@ -236,3 +237,46 @@ jobs: | |
./**/*.whl | ||
./**/*.tar.gz | ||
./**/*.zip | ||
release_docs: | ||
name: Upload documentation | ||
if: (github.event_name == 'push' && contains(github.ref, 'refs/tags')) || (github.ref == 'refs/heads/main') | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: HTML-Documentation | ||
path: HTML-Documentation | ||
|
||
- name: Get Bot Application Token | ||
id: get_workflow_token | ||
uses: peter-murray/workflow-application-token-action@v2 | ||
with: | ||
application_id: ${{ secrets.BOT_APPLICATION_ID }} | ||
application_private_key: ${{ secrets.BOT_APPLICATION_PRIVATE_KEY }} | ||
|
||
- name: Deploy documentation to pyoptislang-dev-docs repository | ||
if: github.ref == 'refs/heads/main' | ||
uses: JamesIves/[email protected] | ||
with: | ||
repository-name: pyansys/pygeometry-dev-docs | ||
token: ${{ steps.get_workflow_token.outputs.token }} | ||
branch: gh-pages | ||
folder: HTML-Documentation | ||
clean: true | ||
single-commit: true | ||
|
||
- name: Deploy documentation to pyoptislang-docs repository | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
repository-name: pyansys/pygeometry-docs | ||
token: ${{ steps.get_workflow_token.outputs.token }} | ||
branch: gh-pages | ||
folder: HTML-Documentation | ||
clean: true | ||
single-commit: true |