mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-27 18:50:41 +00:00
ci: improve GitHub Actions workflow for website builds (#1151)
# What does this PR do? Refine the existing update-readthedocs.yml workflow to enhance automation and reliability. Updates include: - Expanding path triggers to cover all documentation files (docs/**) and build artifacts. - Adding steps to set up Python (3.11), install uv, sync dependencies, and build HTML using make html. - Ensuring the ReadTheDocs build trigger only runs on workflow_dispatch events. These improvements help validate website builds in PRs, preventing issues before merging. Signed-off-by: Sébastien Han <seb@redhat.com> Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
dd43494847
commit
33a64eb5ec
1 changed files with 28 additions and 3 deletions
31
.github/workflows/update-readthedocs.yml
vendored
31
.github/workflows/update-readthedocs.yml
vendored
|
@ -11,17 +11,42 @@ on:
|
|||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'docs/source/**'
|
||||
- 'docs/resources/**'
|
||||
- 'docs/**'
|
||||
- '.github/workflows/update-readthedocs.yml'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'docs/**'
|
||||
- '.github/workflows/update-readthedocs.yml'
|
||||
|
||||
jobs:
|
||||
update-readthedocs:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TOKEN: ${{ secrets.READTHEDOCS_TOKEN }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@v5
|
||||
|
||||
- name: Sync with uv
|
||||
run: uv sync --extra docs
|
||||
|
||||
- name: Build HTML
|
||||
run: |
|
||||
cd docs
|
||||
uv run make html
|
||||
|
||||
- name: Trigger ReadTheDocs build
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
if [ -z "$TOKEN" ]; then
|
||||
echo "READTHEDOCS_TOKEN is not set"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue