Skip to content

Commit 945e68a

Browse files
committed
testing release
1 parent de8d37e commit 945e68a

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

.github/workflows/publish_doc.yaml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- master
99
tags:
1010
- '[0-9]+.[0-9]+.[0-9]+'
11+
1112
# Allow this workflow manually from the Actions tab
1213
workflow_dispatch:
1314

@@ -51,13 +52,30 @@ jobs:
5152
git config --global user.name "${{ github.actor }}"
5253
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
5354
55+
- name: GitHub Tag Name example
56+
run: |
57+
echo "Tag name from github.ref_name: ${{ github.ref_name }} and from github.event_name ${{ github.event_name }}"
58+
5459
- name: Build API reference
5560
run: pdocs as_markdown -o docs/ dcm2bids --overwrite
5661

57-
- name: Build docs for specific release
58-
if: github.event_name == 'release'
62+
- name: Build docs for new release
63+
if: github.event_name == 'published'
64+
run: |
65+
VERSION=$(dcm2bids -v | awk '/dcm2bids/ {print $3}')
66+
mike deploy -p $VERSION latest -u
67+
68+
- name: Build docs for new release
69+
if: github.event_name == 'published' && startsWith(github.ref, 'refs/tags/')
5970
run: |
60-
mike deploy -p ${{ github.ref_name }} latest -u
71+
VERSION=$(dcm2bids -v | awk '/dcm2bids/ {print $3}')
72+
mike deploy -p $VERSION latest -u
73+
74+
# - name: Build docs for specific release (already deployed)
75+
# if: github.event_name != 'release' && github.ref_name
76+
# run: |
77+
# VERSION=$(dcm2bids -v | awk '/dcm2bids/ {print $3}')
78+
# mike deploy -p $VERSION
6179

6280
- name: Deploy dev version
6381
if: ${{ github.ref == 'refs/heads/master' }}

0 commit comments

Comments
 (0)