-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: use RELEASE_TAG env variable for docs version if available
- Loading branch information
1 parent
494314b
commit 45707fb
Showing
4 changed files
with
49 additions
and
27 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 |
---|---|---|
|
@@ -65,32 +65,11 @@ jobs: | |
- name: Lint | ||
run: tox -e package -e lint -e pyupgrade | ||
|
||
# Build and deploy docs | ||
docs: | ||
if: github.ref == 'refs/heads/stable' | ||
name: Build and deploy docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install deps | ||
run: pip install -e . && pip install sphinx | ||
- name: Build docs | ||
run: sphinx-build -b html docs docs/build && touch docs/build/.nojekyll | ||
- name: Deploy docs | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: docs/build | ||
|
||
# Create a new semantic release | ||
# Only runs on the original repo, not forks | ||
release: | ||
if: github.repository_owner == 'stephenmcd' | ||
needs: [test, lint, docs] | ||
needs: [test, lint] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -109,3 +88,31 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | ||
|
||
# Build and deploy docs | ||
docs: | ||
if: github.ref == 'refs/heads/stable' | ||
needs: release | ||
name: build and deploy docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install deps | ||
run: pip install -e . && pip install sphinx | ||
- uses: actions-ecosystem/action-get-latest-tag@v1 | ||
id: get-latest-tag | ||
with: | ||
semver_only: true | ||
- name: Get release tag | ||
run: echo "RELEASE_TAG=${{ steps.get-latest-tag.outputs.tag }}" >> $GITHUB_ENV | ||
- name: Build docs | ||
run: sphinx-build -b html docs docs/build && touch docs/build/.nojekyll | ||
- name: Deploy docs | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: docs/build |
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