Skip to content

Build Airflow docs with the theme from this checkout - #1691

Merged
shahar1 merged 2 commits into
apache:mainfrom
shahar1:build-airflow-docs-with-local-theme
Oct 24, 2026
Merged

shahar1 merged 2 commits into
apache:mainfrom
shahar1:build-airflow-docs-with-local-theme

Conversation

@shahar1

@shahar1 shahar1 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

See: apache/airflow#45576

AI Summary Checking a `sphinx_airflow_theme` change on real Airflow documentation meant building a wheel by hand and installing it inside a Breeze shell of an Airflow checkout, and CI only rendered the small demo site.
  • ./site.sh build-airflow-docs [args] prepares the theme and runs breeze build-docs --sphinx-airflow-theme-path in an Airflow checkout (AIRFLOW_REPO, default ../airflow; arguments go to breeze build-docs, default apache-airflow).
  • The theme README's manual 7-step procedure is replaced by that command.
  • Build docs uploads apache-airflow docs built with the PR's theme as the airflow-docs-with-theme artifact for pull requests that change the theme version. The step is informational (continue-on-error).

Depends on the apache/airflow PR adding --sphinx-airflow-theme-path (for apache/airflow#45576); merge that first, otherwise the preview step fails (without failing the PR).

Verified locally with Docker against that branch, with GITHUB_REPOSITORY=apache/airflow-site as on Actions.

Generated-by: Claude Code (Claude Opus 5.5)

🤖 Generated with Claude Code

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Finally a good idea on how to bridge the two together :)

@shahar1

shahar1 commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

Nice. Finally a good idea on how to bridge the two together :)

Thanks! Could you please also review apache/airflow#75001 ?

@potiuk

potiuk commented Oct 18, 2026

Copy link
Copy Markdown
Member

Nice. Finally a good idea on how to bridge the two together :)

Thanks! Could you please also review apache/airflow#75001 ?

Did.

Checking a theme change on real Airflow documentation meant building a
wheel by hand, copying it into an Airflow checkout and installing it in
Breeze before building the docs.

Add ./site.sh build-airflow-docs, which prepares the theme and runs
breeze build-docs --sphinx-airflow-theme-path in an Airflow checkout, and
replace the manual steps in the theme README with it. Pull requests that
change the theme version also build the Airflow docs with the new theme
and upload them as an artifact. The step does not fail the PR, as it
depends on the Breeze option being available on apache/airflow main.
prepare-theme and build-airflow-docs only built the landing pages when
dist/index.html was missing, so after the first build, edits to SCSS or
JS were silently ignored and the old bundle was copied into the theme.

Rebuild when any file under landing-pages/src, landing-pages/site/assets
or the docsy theme assets is newer than dist/index.html. Only these
asset source directories are checked, so unrelated writes under
landing-pages (such as the CI profile-image refresh that runs
before build-airflow-docs, after node was removed) do not trigger a
rebuild.
@shahar1
shahar1 force-pushed the build-airflow-docs-with-local-theme branch from 63f6ea8 to 3127387 Compare October 23, 2026 19:34
shahar1 added a commit to shahar1/airflow that referenced this pull request Oct 24, 2026
apache/airflow-site#1691 makes prepare-theme rebuild the landing pages when their SCSS/JS sources changed, so the note would be wrong once it lands. The recommended command works with old and new site.sh.
@shahar1
shahar1 merged commit 25a3472 into apache:main Oct 24, 2026
2 checks passed
@shahar1
shahar1 deleted the build-airflow-docs-with-local-theme branch October 24, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants