Skip to content

Commit

Permalink
Update script which triggers RTD build to use new RTD webhook api.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kami committed May 30, 2019
1 parent 51fe8e7 commit b891626
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Expand Up @@ -34,7 +34,9 @@ matrix:
- env: ENV=coverage
python: 2.7
before_script: TOX_ENV=coverage-travis
- env: ENV=docs
- env:
- ENV=docs
- secure: "d4F2RE2iWFh6yqE5MUxnakDihBMsY/hMsaMWllVAYU/fvCMKhaW97d51EiS55kur/eNVX2jpEqkVkSu5VeNSxC3w9sZTG+dHVb8A43o9QaSCPngvHTZ4X9fx8lB96G7uju6pmm5ovKt85hxZW2uQNYo3ugwCUl94lVDYqo+KJUM="
python: 3.5
before_script: TOX_ENV=docs-travis
# Note: graphviz is needed for grapgs embedded in the docs
Expand Down
9 changes: 5 additions & 4 deletions contrib/trigger_rtd_build.py
Expand Up @@ -14,11 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import sys
import os

import requests

token = os.environ['RTD_TOKEN']

key = sys.argv[1]
url = 'https://readthedocs.org/build/%s' % (key)
r = requests.post(url)
url = 'https://readthedocs.org/api/v2/webhook/libcloud/87656/'
r = requests.post(url, data={'token': token})
print(r.text)

0 comments on commit b891626

Please sign in to comment.