mirror of
https://github.com/lvgl/lvgl.git
synced 2026-06-01 00:51:49 +08:00
ci(docs): fix docs ci by fetching lvgl in default gh workspace folder (#9053)
This commit is contained in:
@@ -23,7 +23,6 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
path: lvgl
|
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
@@ -42,14 +41,14 @@ jobs:
|
|||||||
!${{ env.pythonLocation }}/bin/pip*
|
!${{ env.pythonLocation }}/bin/pip*
|
||||||
!${{ env.pythonLocation }}/lib/python*/site-packages/pip*
|
!${{ env.pythonLocation }}/lib/python*/site-packages/pip*
|
||||||
!${{ env.pythonLocation }}/lib/python*/site-packages/setuptools*
|
!${{ env.pythonLocation }}/lib/python*/site-packages/setuptools*
|
||||||
key: ${{ env.pythonLocation }}-${{ hashFiles('lvgl/docs/requirements.txt') }}
|
key: ${{ env.pythonLocation }}-${{ hashFiles('docs/requirements.txt') }}
|
||||||
- name: Install Doxygen and Latex dependencies
|
- name: Install Doxygen and Latex dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install doxygen texlive-xetex texlive-binaries texlive-lang-english latexmk fonts-freefont-otf
|
sudo apt-get install doxygen texlive-xetex texlive-binaries texlive-lang-english latexmk fonts-freefont-otf
|
||||||
- name: Install requirements
|
- name: Install requirements
|
||||||
run: |
|
run: |
|
||||||
pip install -r lvgl/docs/requirements.txt
|
pip install -r docs/requirements.txt
|
||||||
- name: Setup Emscripten cache
|
- name: Setup Emscripten cache
|
||||||
id: cache-system-libraries
|
id: cache-system-libraries
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
@@ -64,14 +63,19 @@ jobs:
|
|||||||
uses: hendrikmuhs/ccache-action@v1
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
- name: Build examples (with cache)
|
- name: Build examples (with cache)
|
||||||
run: |
|
run: |
|
||||||
./lvgl/scripts/build_html_examples.sh --symlink "${PWD}/lvgl"
|
# Grab the current name in case the LVGL folder is not called lvgl
|
||||||
|
# as it could be the case if this is running from a fork
|
||||||
|
LVGL_FOLDER=$(pwd)
|
||||||
|
# Move to the parent folder to fetch emscripten port.
|
||||||
|
cd ..
|
||||||
|
./lvgl/scripts/build_html_examples.sh --symlink $LVGL_FOLDER
|
||||||
- name: Build docs
|
- name: Build docs
|
||||||
run: lvgl/docs/build.py html
|
run: docs/build.py html
|
||||||
- name: Remove .doctrees
|
- name: Remove .doctrees
|
||||||
run: rm -rf lvgl/docs/build/html/.doctrees
|
run: rm -rf docs/build/html/.doctrees
|
||||||
- name: Retrieve version
|
- name: Retrieve version
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=VERSION_NAME::$(lvgl/scripts/find_version.sh)"
|
echo "::set-output name=VERSION_NAME::$(scripts/find_version.sh)"
|
||||||
id: version
|
id: version
|
||||||
- name: Deploy to subfolder
|
- name: Deploy to subfolder
|
||||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||||
@@ -80,7 +84,7 @@ jobs:
|
|||||||
token: ${{ secrets.LVGL_BOT_TOKEN }}
|
token: ${{ secrets.LVGL_BOT_TOKEN }}
|
||||||
repository-name: lvgl/docs
|
repository-name: lvgl/docs
|
||||||
branch: gh-pages # The branch the action should deploy to.
|
branch: gh-pages # The branch the action should deploy to.
|
||||||
folder: lvgl/docs/build/html # The folder the action should deploy.
|
folder: docs/build/html # The folder the action should deploy.
|
||||||
target-folder: ${{ steps.version.outputs.VERSION_NAME }}
|
target-folder: ${{ steps.version.outputs.VERSION_NAME }}
|
||||||
git-config-name: lvgl-bot
|
git-config-name: lvgl-bot
|
||||||
git-config-email: lvgl-bot@users.noreply.github.com
|
git-config-email: lvgl-bot@users.noreply.github.com
|
||||||
@@ -92,7 +96,7 @@ jobs:
|
|||||||
token: ${{ secrets.LVGL_BOT_TOKEN }}
|
token: ${{ secrets.LVGL_BOT_TOKEN }}
|
||||||
repository-name: lvgl/docs
|
repository-name: lvgl/docs
|
||||||
branch: gh-pages # The branch the action should deploy to.
|
branch: gh-pages # The branch the action should deploy to.
|
||||||
folder: lvgl/docs/build/html # The folder the action should deploy.
|
folder: docs/build/html # The folder the action should deploy.
|
||||||
target-folder: master
|
target-folder: master
|
||||||
git-config-name: lvgl-bot
|
git-config-name: lvgl-bot
|
||||||
git-config-email: lvgl-bot@users.noreply.github.com
|
git-config-email: lvgl-bot@users.noreply.github.com
|
||||||
|
|||||||
Reference in New Issue
Block a user