potiuk commented on code in PR #32495:
URL: https://github.com/apache/airflow/pull/32495#discussion_r1258615675
##########
dev/breeze/src/airflow_breeze/commands/developer_commands.py:
##########
@@ -405,6 +408,52 @@ def build_docs(
sys.exit(process.returncode)
[email protected](name="publish-docs")
[email protected]("-d", "--disable-checks", help="Disables extra checks.",
is_flag=True)
[email protected]("-s", "--override-versioned", help="Overrides versioned
directories.", is_flag=True)
[email protected](
+ "-s", "--airflow-site-directory", help="Local directory path of cloned
airflow-site repo.", required=True
+)
[email protected](
+ "--package-filter",
+ help="List of packages to consider.",
+ type=NotVerifiedBetterChoice(get_available_documentation_packages()),
+ multiple=True,
+)
+@option_verbose
+@option_dry_run
+def publish_docs(
+ disable_checks: bool,
+ override_versioned: bool,
+ airflow_site_directory: bool,
+ package_filter: tuple[str],
+):
+ """Publishes documentation to airflow-site."""
+ if not os.path.isdir(airflow_site_directory):
+ get_console().print(
+ "\n[error]location pointed by airflow_site_dir is not valid. "
+ "Provide the path of cloned airflow-site repo\n"
+ )
+
+ # set AIRFLOW_SITE_DIR env variable
+ os.environ["AIRFLOW_SITE_DIR"] = airflow_site_directory
Review Comment:
BTW. It's OK To partially copy the code for now and have different "builder"
in publish docs and in "build_docs.py" - we can later re-join them when we also
get rid of the `build_docs.py` from the "docs" folder and move it to breeze
(which will eventually happen most likely).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]