From 565caf3a989337c826d52c97323e2b9475ae6be6 Mon Sep 17 00:00:00 2001 From: Max Rakitin Date: Thu, 10 Aug 2023 23:45:23 -0400 Subject: [PATCH] CI: update the docs building workflow to publish the docs on release --- .github/workflows/docs.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6d6e1dd..3c17c10 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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/mongodb-github-action@1.6.0 - 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