forked from phoenix-oss/llama-stack-mirror
fixes?
This commit is contained in:
parent
766b11f1f8
commit
2987fb37c3
1 changed files with 13 additions and 6 deletions
17
.github/workflows/update-readthedocs.yml
vendored
17
.github/workflows/update-readthedocs.yml
vendored
|
@ -1,6 +1,12 @@
|
|||
name: Update ReadTheDocs
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'RTD version to update'
|
||||
required: false
|
||||
default: 'latest'
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
@ -12,25 +18,26 @@ on:
|
|||
jobs:
|
||||
update-readthedocs:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TOKEN: ${{ secrets.READTHEDOCS_TOKEN }}
|
||||
steps:
|
||||
- name: Trigger ReadTheDocs build
|
||||
run: |
|
||||
if [ -z "{{ secrets.READTHEDOCS_TOKEN }}" ]; then
|
||||
if [ -z "$TOKEN" ]; then
|
||||
echo "READTHEDOCS_TOKEN is not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
y="{{ secrets.READTHEDOCS_TOKEN }}"
|
||||
y=$TOKEN
|
||||
py="foo-${y}"
|
||||
echo $py
|
||||
exit 1
|
||||
|
||||
response=$(curl -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"token": "{{ secrets.READTHEDOCS_TOKEN }}"}' \
|
||||
-d '{"token": "$TOKEN"}' \
|
||||
https://readthedocs.org/api/v2/webhook/llama-stack/289764/)
|
||||
|
||||
echo $response
|
||||
echo "Response: $response"
|
||||
if [ $(echo $response | jq -r '.build_triggered') != 'true' ]; then
|
||||
echo "Failed to trigger ReadTheDocs build"
|
||||
exit 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue