diff --git a/.github/workflows/compile_docs.yml b/.github/workflows/compile_docs.yml index 0162fe024b..cd8a42250a 100644 --- a/.github/workflows/compile_docs.yml +++ b/.github/workflows/compile_docs.yml @@ -23,7 +23,6 @@ jobs: - name: Checkout uses: actions/checkout@v5 with: - path: lvgl persist-credentials: false fetch-depth: 0 - name: Setup Python @@ -42,14 +41,14 @@ jobs: !${{ env.pythonLocation }}/bin/pip* !${{ env.pythonLocation }}/lib/python*/site-packages/pip* !${{ 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 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 lvgl/docs/requirements.txt + pip install -r docs/requirements.txt - name: Setup Emscripten cache id: cache-system-libraries uses: actions/cache@v4 @@ -64,14 +63,19 @@ jobs: uses: hendrikmuhs/ccache-action@v1 - name: Build examples (with cache) 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 - run: lvgl/docs/build.py html + run: docs/build.py html - name: Remove .doctrees - run: rm -rf lvgl/docs/build/html/.doctrees + run: rm -rf docs/build/html/.doctrees - name: Retrieve version run: | - echo "::set-output name=VERSION_NAME::$(lvgl/scripts/find_version.sh)" + echo "::set-output name=VERSION_NAME::$(scripts/find_version.sh)" id: version - name: Deploy to subfolder if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} @@ -80,7 +84,7 @@ jobs: token: ${{ secrets.LVGL_BOT_TOKEN }} repository-name: lvgl/docs 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 }} git-config-name: lvgl-bot git-config-email: lvgl-bot@users.noreply.github.com @@ -92,7 +96,7 @@ jobs: token: ${{ secrets.LVGL_BOT_TOKEN }} repository-name: lvgl/docs 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 git-config-name: lvgl-bot git-config-email: lvgl-bot@users.noreply.github.com