File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 1
1
name : Docs
2
- on : [push, pull_request, workflow_dispatch]
2
+ on :
3
+ push :
4
+ branches : [main]
5
+ pull_request :
6
+ branches : [main]
7
+ types : [closed]
8
+ # only when docs files have been modified
9
+ path : ['docs/**']
3
10
permissions :
4
11
contents : write
5
12
10
17
jobs :
11
18
docs :
12
19
runs-on : ubuntu-latest
20
+ # Checks that pull request was merged
21
+ if : >
22
+ github.event_name == 'push' ||
23
+ (github.event_name == 'pull_request' &&
24
+ github.event.pull_request.merged == true)
13
25
steps :
14
26
- uses : actions/checkout@v4
15
27
- uses : actions/setup-python@v5
38
50
cd ..
39
51
- name : Deploy
40
52
uses : peaceiris/actions-gh-pages@v3
41
- if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
42
53
with :
43
54
publish_branch : gh-pages
44
55
github_token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments