Skip to content

Commit 6d6ee5e

Browse files
authored
Merge pull request #13 from QuLogic/publish-release
Set release tag when publishing
2 parents 3c55cb3 + 32dd749 commit 6d6ee5e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/docs.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Docs
22

33
on: [push, pull_request]
44

5+
env:
6+
IS_RELEASE: |
7+
${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
58
69
jobs:
710
build:
@@ -14,9 +17,14 @@ jobs:
1417
- name: Install mpl-gui
1518
run: python -m pip install -v .
1619
- name: Build
17-
run: make -Cdocs html
20+
run: |
21+
if [ "x${IS_RELEASE}" == "xtrue" ]; then
22+
O="-t release"
23+
fi
24+
make -Cdocs html O="$O"
25+
1826
- name: Publish
19-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
27+
if: ${{ env.IS_RELEASE == 'true' }}
2028
uses: peaceiris/actions-gh-pages@v3
2129
with:
2230
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)