Skip to content

Commit

Permalink
Create rebuild_readthedocs.yml (#131)
Browse files Browse the repository at this point in the history
* Create rebuild_readthedocs.yml

* Update rebuild_readthedocs.yml

* Update rebuild_readthedocs.yml

* Update rebuild_readthedocs.yml

* Update rebuild_readthedocs.yml

* Update rebuild_readthedocs.yml
  • Loading branch information
rly committed Aug 23, 2023
1 parent be511ca commit 5dc2f86
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/rebuild_readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Rebuild ReadTheDocs
on:
schedule:
- cron: '0 5 * * 0' # every Sunday at 05:00 UTC (midnight EST)
push:
workflow_dispatch:

jobs:
rebuild-readthedocs:
name: Trigger build of latest version
runs-on: ubuntu-latest
steps:
- name: Send POST request
# this uses Ryan's RTD API token
run: |
curl_output=$(curl -w "%{http_code}\\n" -s -X POST \
-H "Authorization: Token ${{ secrets.RTD_TOKEN }}" \
https://readthedocs.org/api/v3/projects/nwb-overview/versions/latest/builds/ \
-o /dev/null)
echo $curl_output
# return exit code 1 if returned http code is not 202
[ "$curl_output" = "202" ]

0 comments on commit 5dc2f86

Please sign in to comment.