Skip to content

Commit 8581aba

Browse files
committed
Update Action for Readthedocs according GitHub Flow dev process
1 parent 0151c23 commit 8581aba

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

.github/workflows/publish-to-readthedocs.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@ on:
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/**'
168

179
env:
1810
RTDS_ADS_PROJECT: https://readthedocs.org/api/v3/projects/accelerated-data-science
@@ -24,17 +16,16 @@ jobs:
2416
runs-on: ubuntu-latest
2517

2618
steps:
27-
- name: When PR ✅ merged - Trigger Readthedocs build
28-
if: github.event_name == 'pull_request_target' && github.event.pull_request.merged == true
19+
- name: When tag 🏷️ pushed - Trigger Readthedocs build
20+
if: github.event_name == 'push' && startsWith(github.ref_name, 'v')
2921
run: |
22+
# trigger build/publish of latest version
3023
curl \
3124
-X POST \
3225
-H "Authorization: Token $RTDS_ADS_TOKEN" $RTDS_ADS_PROJECT/versions/latest/builds/
33-
- name: When tag 🏷️ pushed - Trigger Readthedocs build
34-
if: github.event_name == 'push' && startsWith(github.ref_name, 'v')
35-
run: |
36-
# add 10 minutes wait time for readthedocs see freshly created tag
37-
sleep 10m
26+
# add 15 minutes wait time for readthedocs see freshly created tag
27+
sleep 15m
28+
# trigger build/publish of v*.*.* version
3829
curl \
3930
-X POST \
4031
-H "Authorization: Token $RTDS_ADS_TOKEN" $RTDS_ADS_PROJECT/versions/${{ github.ref_name }}/builds/

0 commit comments

Comments
 (0)