File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 5
5
push :
6
6
tags :
7
7
- ' v*.*.*'
8
+ # Auto-trigger this workflow on merge to main changes in docs/** folder
9
+ pull_request_target :
10
+ types :
11
+ - closed
12
+ branches :
13
+ - main
14
+ paths :
15
+ - ' docs/**'
8
16
9
17
jobs :
10
18
build-n-publish :
11
19
name : Build and publish Docs 📖 to Readthedocs
12
20
runs-on : ubuntu-latest
13
21
14
22
steps :
15
- - name : Trigger Readthedocs build
23
+ - name : When PR ✅ merged - Trigger Readthedocs build
24
+ if : github.event.pull_request.merged == true
25
+ env :
26
+ RTDS_ADS_PROJECT : https://readthedocs.org/api/v3/projects/accelerated-data-science
27
+ RTDS_ADS_TOKEN : ${{ secrets.RTDS_ADS_TOKEN }}
28
+ run : |
29
+ curl \
30
+ -X POST \
31
+ -H "Authorization: Token $RTDS_ADS_TOKEN" $RTDS_ADS_PROJECT/versions/latest/builds/
32
+ - name : When tag 🏷️ pushed - Trigger Readthedocs build
33
+ if : github.event_name != 'pull_request'
16
34
env :
17
35
RTDS_ADS_PROJECT : https://readthedocs.org/api/v3/projects/accelerated-data-science
18
36
RTDS_ADS_TOKEN : ${{ secrets.RTDS_ADS_TOKEN }}
You can’t perform that action at this time.
0 commit comments