Skip to content

Commit

Permalink
Merge pull request #266 from SamGuay/fix_gha_mike
Browse files Browse the repository at this point in the history
Fix release tags in GHA
  • Loading branch information
arnaudbore authored Sep 13, 2023
2 parents de8d37e + ff02181 commit a1b78d4
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/publish_doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
- master
tags:
- '[0-9]+.[0-9]+.[0-9]+'
release:
types: [published]
# Allow this workflow manually from the Actions tab
workflow_dispatch:

Expand Down Expand Up @@ -54,13 +56,25 @@ jobs:
- name: Build API reference
run: pdocs as_markdown -o docs/ dcm2bids --overwrite

- name: Build docs for specific release
- name: Build docs for new release
if: github.event_name == 'release'
run: |
echo "Version: $(dcm2bids -v | awk '/dcm2bids/ {print $3}')"
echo "Version: ${{ github.ref_name }}"
mike deploy -p ${{ github.ref_name }} latest -u
# This might be also triggered for new release as it pushes a new tag,
# but it's ok even if there is an error on this run, the previous run is ok.
- name: Build docs for releases already deployed
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: |
echo "Version: $(dcm2bids -v | awk '/dcm2bids/ {print $3}')"
echo "Version: ${{ github.ref_name }}"
mike deploy -p ${{ github.ref_name }}
- name: Deploy dev version
if: ${{ github.ref == 'refs/heads/master' }}
run: |
VERSION=$(dcm2bids -v | awk '/dcm2bids/ {print $3}')
echo "Version: $VERSION"
mike deploy -p $VERSION dev -u

0 comments on commit a1b78d4

Please sign in to comment.