Skip to content

Commit

Permalink
CI: update the docs building workflow to publish the docs on release
Browse files Browse the repository at this point in the history
  • Loading branch information
mrakitin committed Aug 11, 2023
1 parent c333952 commit 565caf3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 565caf3

Please sign in to comment.