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 55 push :
66 tags :
77 - ' 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/**'
816
917jobs :
1018 build-n-publish :
1119 name : Build and publish Docs 📖 to Readthedocs
1220 runs-on : ubuntu-latest
1321
1422 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'
1634 env :
1735 RTDS_ADS_PROJECT : https://readthedocs.org/api/v3/projects/accelerated-data-science
1836 RTDS_ADS_TOKEN : ${{ secrets.RTDS_ADS_TOKEN }}
You can’t perform that action at this time.
0 commit comments