Skip to content

Commit b3025fd

Browse files
committed
Refactor GitHub Actions workflow: adjust event triggers for documentation build and deployment steps
1 parent 3c3aa7d commit b3025fd

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/docs.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
12
name: Documentation Build Test
23

34
on:
4-
release:
5-
types: [published]
65
push:
6+
branches:
7+
- '**'
78
tags:
89
- '*'
10+
pull_request:
11+
release:
12+
types: [published]
913

1014
jobs:
1115
build-docs:
@@ -37,11 +41,13 @@ jobs:
3741
make html
3842
3943
- name: Upload artifact for GitHub Pages
44+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') || github.event_name == 'release'
4045
uses: actions/upload-pages-artifact@v3
4146
with:
4247
path: docs/_build/html
4348

4449
deploy-docs:
50+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') || github.event_name == 'release'
4551
needs: build-docs
4652
runs-on: ubuntu-latest
4753
permissions:

0 commit comments

Comments
 (0)