From 9dc63fe846603c98c4cb0f11a464bc8cbea2dd29 Mon Sep 17 00:00:00 2001 From: Samuel Guay Date: Tue, 12 Sep 2023 17:55:57 -0400 Subject: [PATCH] die trying --- .github/workflows/publish_doc.yaml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish_doc.yaml b/.github/workflows/publish_doc.yaml index b7be7493..31a9d651 100644 --- a/.github/workflows/publish_doc.yaml +++ b/.github/workflows/publish_doc.yaml @@ -8,7 +8,8 @@ on: - master tags: - '[0-9]+.[0-9]+.[0-9]+' - + release: + types: [published] # Allow this workflow manually from the Actions tab workflow_dispatch: @@ -59,23 +60,17 @@ jobs: - name: Build API reference run: pdocs as_markdown -o docs/ dcm2bids --overwrite - - name: Build docs for new release - if: github.event_name == 'published' + - name: Build docs for releases already deployed + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') run: | VERSION=$(dcm2bids -v | awk '/dcm2bids/ {print $3}') - mike deploy -p $VERSION latest -u + mike deploy -p $VERSION - name: Build docs for new release - if: github.event_name == 'published' && startsWith(github.ref, 'refs/tags/') + if: github.event_name == 'published' run: | VERSION=$(dcm2bids -v | awk '/dcm2bids/ {print $3}') - mike deploy -p $VERSION latest -u - - # - name: Build docs for specific release (already deployed) - # if: github.event_name != 'release' && github.ref_name - # run: | - # VERSION=$(dcm2bids -v | awk '/dcm2bids/ {print $3}') - # mike deploy -p $VERSION + mike deploy -p ${{ github.event.ref }} latest -u - name: Deploy dev version if: ${{ github.ref == 'refs/heads/master' }}