Skip to content

Commit a1644cf

Browse files
committed
testing release
1 parent de8d37e commit a1644cf

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

.github/workflows/publish_doc.yaml

Lines changed: 22 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,31 @@ 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 }}"
58+
echo "Tag name from github.ref_name: ${{ github.ref_name }} and from github.event_name ${{ github.event_name }}"
59+
5460
- name: Build API reference
5561
run: pdocs as_markdown -o docs/ dcm2bids --overwrite
5662

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

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

0 commit comments

Comments
 (0)