File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Publish Docs"
2+
3+ on :
4+ # Auto-trigger this workflow on tag creation
5+ push :
6+ tags :
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/**'
16+
17+ jobs :
18+ build-n-publish :
19+ name : Build and publish Docs 📖 to Readthedocs
20+ runs-on : ubuntu-latest
21+
22+ steps :
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'
34+ env :
35+ RTDS_ADS_PROJECT : https://readthedocs.org/api/v3/projects/accelerated-data-science
36+ RTDS_ADS_TOKEN : ${{ secrets.RTDS_ADS_TOKEN }}
37+ run : |
38+ curl \
39+ -X POST \
40+ -H "Authorization: Token $RTDS_ADS_TOKEN" $RTDS_ADS_PROJECT/versions/${{ github.ref_name }}/builds/
You can’t perform that action at this time.
0 commit comments