CI: publish documentation for tagged commits.
This commit is contained in:
parent
e156ac62c5
commit
a243e0443e
13
.github/workflows/main.yaml
vendored
13
.github/workflows/main.yaml
vendored
|
@ -55,7 +55,7 @@ jobs:
|
|||
- name: Build documentation
|
||||
run: |
|
||||
sphinx-build docs docs/_build
|
||||
- name: Publish documentation
|
||||
- name: Publish development documentation
|
||||
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main'
|
||||
uses: JamesIves/github-pages-deploy-action@releases/v3
|
||||
with:
|
||||
|
@ -63,3 +63,14 @@ jobs:
|
|||
BRANCH: gh-pages
|
||||
FOLDER: docs/_build
|
||||
TARGET_FOLDER: latest/
|
||||
- name: Extract release version
|
||||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
|
||||
run: echo "VERSION=$(python setup.py --version)" >>$GITHUB_ENV
|
||||
- name: Publish release documentation
|
||||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
|
||||
uses: JamesIves/github-pages-deploy-action@releases/v3
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BRANCH: gh-pages
|
||||
FOLDER: docs/_build
|
||||
TARGET_FOLDER: v${{ env.VERSION }}/
|
||||
|
|
Loading…
Reference in a new issue