From b3c45b126f2e29c027d012d34f4750eeb7696752 Mon Sep 17 00:00:00 2001 From: Victor Wheeler Date: Thu, 26 Feb 2026 06:25:01 -0700 Subject: [PATCH] ci(docs): skip workflow if docs don't change (#9688) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/compile_docs.yml | 34 ++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/.github/workflows/compile_docs.yml b/.github/workflows/compile_docs.yml index ed3da6b317..b6d59d25b0 100644 --- a/.github/workflows/compile_docs.yml +++ b/.github/workflows/compile_docs.yml @@ -1,10 +1,30 @@ name: Build docs on: pull_request: + paths: + # '**/lv*.h' is not included for pull requests because files in this path + # cannot break the doc build, and the purpose of having the docs build for + # pull requests is to catch when something breaks the build. No input files + # in that path have the capacity to break the doc build. + - 'docs/**' + - 'examples/**' + - 'demos/**' + - 'scripts/build_html_examples.sh' + - 'scripts/find_version.sh' push: branches: - - master - - 'release/*' + - master + - 'release/*' + paths: + - 'docs/**' + - 'src/**/lv*.h' + - 'examples/**' + - 'demos/**' + - 'scripts/build_html_examples.sh' + - 'scripts/find_version.sh' + - 'lv_conf_template.h' + - 'lv_version.h' + - 'lvgl.h' # https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#concurrency # Ensure that only one commit will be running tests at a time on each PR @@ -42,11 +62,13 @@ jobs: !${{ env.pythonLocation }}/lib/python*/site-packages/pip* !${{ env.pythonLocation }}/lib/python*/site-packages/setuptools* key: ${{ env.pythonLocation }}-${{ hashFiles('docs/requirements.txt') }} - - name: Install Doxygen and Latex dependencies + - name: Install Doxygen run: | sudo apt-get update - sudo apt-get install doxygen texlive-xetex texlive-binaries texlive-lang-english latexmk fonts-freefont-otf - - name: Install requirements + sudo apt-get install -y --no-install-recommends doxygen + # Remember these for possible future use. + # texlive-xetex texlive-binaries texlive-lang-english latexmk fonts-freefont-otf + - name: Install Requirements run: | pip install -r docs/requirements.txt - name: Setup Emscripten cache @@ -75,7 +97,7 @@ jobs: run: rm -rf docs/build/html/.doctrees - name: Retrieve version run: | - echo "::set-output name=VERSION_NAME::$(scripts/find_version.sh)" + echo "VERSION_NAME=$(scripts/find_version.sh)" >> "$GITHUB_OUTPUT" id: version - name: Deploy to subfolder if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}