Skip to content

Commit d569921

Browse files
committed
Add release tag when publishing
1 parent 7718f56 commit d569921

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/docs.yml

Lines changed: 10 additions & 3 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:
@@ -16,10 +19,14 @@ jobs:
1619
run: pip install -r requirements-doc.txt
1720

1821
- name: Build
19-
run: make html
20-
- name: Publish
22+
run: |
23+
if [ "x$IS_RELEASE" == "xtrue" ]; then
24+
O="-t release"
25+
fi
26+
make html O="$O"
2127
22-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
28+
- name: Publish
29+
if: ${{ env.IS_RELEASE == 'true' }}
2330
uses: peaceiris/actions-gh-pages@v3
2431
with:
2532
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)