Skip to content

Commit c5ed904

Browse files
author
Sam Daniel Thangarajan
committed
Build documentation when pushing to gh-pages and push only from tag
commits
1 parent 31af548 commit c5ed904

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/wf-push.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,11 @@ jobs:
4242
name: build-artifacts-${{ matrix.python-version }}
4343
path: |
4444
dist/
45-
docs/
4645
4746
4847
deploy-docs:
4948
name: Deploy documentation 📚 to GitHub Pages
50-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
49+
if: ${{ github.event_name == 'push' && github.ref == 'refs/tags' }}
5150
needs:
5251
- build
5352
runs-on: ubuntu-latest
@@ -61,11 +60,21 @@ jobs:
6160
pages: write
6261

6362
steps:
64-
- name: Download docs build artifacts
65-
uses: actions/download-artifact@v6
63+
- uses: actions/checkout@v3
64+
65+
- name: Set up Python 3.12
66+
uses: actions/setup-python@v3
6667
with:
67-
name: build-artifacts-3.12
68-
path: docs/
68+
python-version: 3.12
69+
70+
- name: Upgrade pip
71+
run: python -m pip install --upgrade pip
72+
73+
- name: Install Tox
74+
run: pip install tox
75+
76+
- name: Run Doc
77+
run: tox -e doc
6978

7079
- name: Deploy to GitHub Pages
7180
uses: peaceiris/actions-gh-pages@v3

0 commit comments

Comments
 (0)