|
8 | 8 | - master
|
9 | 9 | tags:
|
10 | 10 | - '[0-9]+.[0-9]+.[0-9]+'
|
| 11 | + |
11 | 12 | # Allow this workflow manually from the Actions tab
|
12 | 13 | workflow_dispatch:
|
13 | 14 |
|
@@ -51,13 +52,30 @@ jobs:
|
51 | 52 | git config --global user.name "${{ github.actor }}"
|
52 | 53 | git config --global user.email "${{ github.actor }}@users.noreply.github.com"
|
53 | 54 |
|
| 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 | +
|
54 | 59 | - name: Build API reference
|
55 | 60 | run: pdocs as_markdown -o docs/ dcm2bids --overwrite
|
56 | 61 |
|
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/') |
59 | 70 | 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 |
61 | 79 |
|
62 | 80 | - name: Deploy dev version
|
63 | 81 | if: ${{ github.ref == 'refs/heads/master' }}
|
|
0 commit comments