-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Merge release and docs actions
- Loading branch information
Showing
2 changed files
with
31 additions
and
30 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
name: Semantic Release | ||
|
||
on: workflow_dispatch | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
|
@@ -24,16 +27,34 @@ jobs: | |
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
# The following line is required to ensure that the package is only published to PyPI when a new version is released. | ||
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true. | ||
# See https://github.com/actions/runner/issues/1173 | ||
if: steps.release.outputs.released == 'true' | ||
# - name: Publish package distributions to PyPI | ||
# uses: pypa/gh-action-pypi-publish@release/v1 | ||
# # The following line is required to ensure that the package is only published to PyPI when a new version is released. | ||
# # NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true. | ||
# # See https://github.com/actions/runner/issues/1173 | ||
# if: steps.release.outputs.released == 'true' | ||
|
||
# - name: Publish package distributions to GitHub Releases | ||
# uses: python-semantic-release/[email protected] | ||
# if: steps.release.outputs.released == 'true' | ||
# with: | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# tag: ${{ steps.release.outputs.tag }} | ||
|
||
- name: Publish package distributions to GitHub Releases | ||
uses: python-semantic-release/[email protected] | ||
- name: Set permissions # Sphinx needs write permissions to perform the checkout | ||
run: | | ||
chmod -R 777 . | ||
- id: deployment_docs | ||
uses: sphinx-notes/pages@v3 | ||
with: | ||
publish: false | ||
documentation_path: './docs/source' | ||
requirements_path: './requeriments_docs.txt' | ||
if: steps.release.outputs.released == 'true' | ||
|
||
- uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ steps.release.outputs.tag }} | ||
publish_dir: ${{ steps.deployment_docs.outputs.artifact }} | ||
if: steps.release.outputs.released == 'true' |