<p dir="auto">Followinq <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="787268651" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/13706" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/13706/hovercard" href="https://github.com/apache/airflow/issues/13706">#13706</a> .</p>
<p dir="auto">Building docs only is not as optimized as it can be.<br>
I think it needs to have some separate behaviour not only optimising the other builds<br>
In case of the doc build we should not only optimise non-needed jobs, but also optimise which part of the documentation should be built.</p>
<p dir="auto">In case of the <a href="https://github.com/apache/airflow/pull/13696/files">https://github.com/apache/airflow/pull/13696/files</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="docs/apache-airflow/howto/index.rst
docs/apache-airflow/howto/initialize-database.rst
docs/apache-airflow/howto/set-up-database.rst
docs/apache-airflow/installation.rst
docs/apache-airflow/redirects.txt"><pre class="notranslate"><code class="notranslate">docs/apache-airflow/howto/index.rst
docs/apache-airflow/howto/initialize-database.rst
docs/apache-airflow/howto/set-up-database.rst
docs/apache-airflow/installation.rst
docs/apache-airflow/redirects.txt
</code></pre></div>
<p dir="auto">Only 'apache-airflow' docs should be built.</p>
<p dir="auto">Similarly when there are limited changes to provider packages (both doc and code).<br>
If we see that we have change in docs/code for only some of the providers, we can take a look at this dependencies:<br>
<a href="https://github.com/apache/airflow/blob/master/airflow/providers/dependencies.json">https://github.com/apache/airflow/blob/master/airflow/providers/dependencies.json</a></p>
<p dir="auto">And only build documentation for those Providers that changed and their dependencies.  And we should do airflow documentation build only when any of the airflow documentation or code changed.</p>
<p dir="auto">It should be rather easy to take a look at the list of files and produce such change list.</p>

<p dir="auto"><strong>Description</strong></p>

<p dir="auto"><strong>Use case / motivation</strong></p>

<p dir="auto"><strong>Are you willing to submit a PR?</strong></p>

<p dir="auto"><strong>Related Issues</strong></p>
<p dir="auto">Thanks to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="618728525" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/8874" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/8874/hovercard" href="https://github.com/apache/airflow/issues/8874">#8874</a> we have now the possibility of selectively building docs, we should add support for it for our CI builds selective checks.</p>
<p dir="auto">This will immensely speed up the CI builds for most of the PRs because we can build only documentation for Providers if particular providers changed and for core only when core doc changes.</p>
<p dir="auto">UPDATE: Breeze already has all the support needed, so this one is only about  the CI speedups</p>