-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: update the docs building workflow to publish the docs on release
- Loading branch information
Showing
1 changed file
with
5 additions
and
4 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 |
---|---|---|
|
@@ -3,13 +3,13 @@ name: Build Documentation | |
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build_docs: | ||
# pull requests are a duplicate of a branch push if they are from within | ||
# the same repo. Skip these | ||
# pull requests are a duplicate of a branch push if they are from within the same repo. Skip these | ||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository | ||
runs-on: ubuntu-latest | ||
strategy: | ||
|
@@ -36,7 +36,7 @@ jobs: | |
uses: supercharge/[email protected] | ||
|
||
- name: Start Sirepo Docker container | ||
uses: NSLS-II/start-sirepo-action@v1 | ||
uses: NSLS-II/start-sirepo-action@v2 | ||
with: | ||
docker-binary: docker | ||
|
||
|
@@ -56,7 +56,7 @@ jobs: | |
mamba-version: "*" | ||
channels: conda-forge | ||
|
||
- name: Install dependencies | ||
- name: Install documentation-building requirements | ||
run: | | ||
# For reference: https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html. | ||
set -vxeo pipefail | ||
|
@@ -78,6 +78,7 @@ jobs: | |
path: docs/build/html/ | ||
|
||
- name: Deploy documentation to nsls-ii.github.io | ||
# if: github.repository_owner == 'NSLS-II' && github.ref_name == 'main' | ||
if: github.event_name == 'release' | ||
# We pin to the SHA, not the tag, for security reasons. | ||
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions | ||
|