ci(docs): fix docs CI. use the action's checked-out repo for emscripten (#9020)

This commit is contained in:
Liam Howatt
2025-10-09 09:15:32 +02:00
committed by GitHub
parent 08a9eb60cf
commit 427d2b3ed8
2 changed files with 37 additions and 26 deletions
+9 -10
View File
@@ -23,6 +23,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v5
with:
path: lvgl
persist-credentials: false
fetch-depth: 0
- name: Setup Python
@@ -41,14 +42,14 @@ jobs:
!${{ env.pythonLocation }}/bin/pip*
!${{ env.pythonLocation }}/lib/python*/site-packages/pip*
!${{ env.pythonLocation }}/lib/python*/site-packages/setuptools*
key: ${{ env.pythonLocation }}-${{ hashFiles('docs/requirements.txt') }}
key: ${{ env.pythonLocation }}-${{ hashFiles('lvgl/docs/requirements.txt') }}
- name: Install Doxygen and Latex dependencies
run: |
sudo apt-get update
sudo apt-get install doxygen texlive-xetex texlive-binaries texlive-lang-english latexmk fonts-freefont-otf
- name: Install requirements
run: |
pip install -r docs/requirements.txt
pip install -r lvgl/docs/requirements.txt
- name: Setup Emscripten cache
id: cache-system-libraries
uses: actions/cache@v4
@@ -63,16 +64,14 @@ jobs:
uses: hendrikmuhs/ccache-action@v1
- name: Build examples (with cache)
run: |
REPO_URL="${{ github.server_url }}/${{ github.repository }}"
COMMIT_REF="${{ github.sha }}"
./scripts/build_html_examples.sh "$REPO_URL" "$COMMIT_REF"
./lvgl/scripts/build_html_examples.sh --symlink "${PWD}/lvgl"
- name: Build docs
run: docs/build.py html
run: lvgl/docs/build.py html
- name: Remove .doctrees
run: rm -rf docs/build/html/.doctrees
run: rm -rf lvgl/docs/build/html/.doctrees
- name: Retrieve version
run: |
echo "::set-output name=VERSION_NAME::$(scripts/find_version.sh)"
echo "::set-output name=VERSION_NAME::$(lvgl/scripts/find_version.sh)"
id: version
- name: Deploy to subfolder
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
@@ -81,7 +80,7 @@ jobs:
token: ${{ secrets.LVGL_BOT_TOKEN }}
repository-name: lvgl/docs
branch: gh-pages # The branch the action should deploy to.
folder: docs/build/html # The folder the action should deploy.
folder: lvgl/docs/build/html # The folder the action should deploy.
target-folder: ${{ steps.version.outputs.VERSION_NAME }}
git-config-name: lvgl-bot
git-config-email: lvgl-bot@users.noreply.github.com
@@ -93,7 +92,7 @@ jobs:
token: ${{ secrets.LVGL_BOT_TOKEN }}
repository-name: lvgl/docs
branch: gh-pages # The branch the action should deploy to.
folder: docs/build/html # The folder the action should deploy.
folder: lvgl/docs/build/html # The folder the action should deploy.
target-folder: master
git-config-name: lvgl-bot
git-config-email: lvgl-bot@users.noreply.github.com