forked from phoenix-oss/llama-stack-mirror
37 lines
977 B
YAML
37 lines
977 B
YAML
name: Update ReadTheDocs
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'docs/source/**'
|
|
- 'docs/resources/**'
|
|
- '.github/workflows/update-readthedocs.yml'
|
|
|
|
jobs:
|
|
update-readthedocs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Trigger ReadTheDocs build
|
|
run: |
|
|
if [ -z "{{ secrets.READTHEDOCS_TOKEN }}" ]; then
|
|
echo "READTHEDOCS_TOKEN is not set"
|
|
exit 1
|
|
fi
|
|
|
|
y="{{ secrets.READTHEDOCS_TOKEN }}"
|
|
py="foo-${y}"
|
|
echo $py
|
|
exit 1
|
|
|
|
response=$(curl -X POST \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"token": "{{ secrets.READTHEDOCS_TOKEN }}"}' \
|
|
https://readthedocs.org/api/v2/webhook/llama-stack/289764/)
|
|
|
|
echo $response
|
|
if [ $(echo $response | jq -r '.build_triggered') != 'true' ]; then
|
|
echo "Failed to trigger ReadTheDocs build"
|
|
exit 1
|
|
fi
|