This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch improve-live-staging-approach-for-docs
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to 
refs/heads/improve-live-staging-approach-for-docs by this push:
     new d28a9695c3f Improve flow for live/staging doc publishing (#50649)
d28a9695c3f is described below

commit d28a9695c3f167c8e2941f14f5e00b49c5ddd53c
Author: Jarek Potiuk <[email protected]>
AuthorDate: Thu May 15 15:43:53 2025 -0400

    Improve flow for live/staging doc publishing (#50649)
    
    There are a couple of improvements for live/staging doc publishing.
    
    1) we use auto/live/staging rather than buckets in the drop-downs
    2) auto selection of live/staging depending on the tag used to
       produce the documentation
    3) we use env variables to pass inputs/outputs to scripts - which
       is good security practice
    4) watermark changes are applied to documentation published to
       staging site
---
 dev/README_RELEASE_AIRFLOW.md     |  18 +++++++++++-------
 dev/README_RELEASE_HELM_CHART.md  |  18 +++++++++++++++---
 dev/README_RELEASE_PROVIDERS.md   |  11 ++++++++---
 docs/README.md                    |  20 +++++++++++++-------
 docs/images/publish_airflow.png   | Bin 91354 -> 173951 bytes
 docs/images/sync_github_to_s3.png | Bin 75926 -> 146423 bytes
 6 files changed, 47 insertions(+), 20 deletions(-)

diff --git a/dev/README_RELEASE_AIRFLOW.md b/dev/README_RELEASE_AIRFLOW.md
index 6e426edab64..eab5cbf1c36 100644
--- a/dev/README_RELEASE_AIRFLOW.md
+++ b/dev/README_RELEASE_AIRFLOW.md
@@ -334,7 +334,7 @@ pipx install -e ./dev/breeze
 ## Publish release candidate documentation (staging)
 
 Documentation is an essential part of the product and should be made available 
to users.
-In our cases, documentation for the pre-release versions is published in 
staging S3 bucket.
+In our cases, documentation for the pre-release versions is published in 
`staging` S3 bucket.
 The documentation source code and build tools are available in the 
`apache/airflow` repository, so
 you need to run several workflows to publish the documentation. More details 
about it can be found in
 [Docs README](../docs/README.md) showing the architecture and workflows 
including manual workflows for
@@ -342,11 +342,12 @@ emergency cases.
 
 There are two steps to publish the documentation:
 
-1. Publish the documentation to the staging S3 bucket.
+1. Publish the documentation to the `staging` S3 bucket.
 
 The release manager publishes the documentation using GitHub Actions workflow
-[Publish Docs to 
S3](https://github.com/apache/airflow/actions/workflows/publish-docs-to-s3.yml).
 You should
-specify the RC tag and choose `s3://staging-docs-airflow-apache-org/docs` 
bucket as destination
+[Publish Docs to 
S3](https://github.com/apache/airflow/actions/workflows/publish-docs-to-s3.yml).
 By default `auto` selection should publish to the `staging` bucket - based on
+the tag you use - pre-release tags go to staging. But you can also override it 
and specify the destination
+manually to be `live` or `staging`.
 
 You should specify 'apache-airflow docker-stack' passed as packages to be
 built.
@@ -850,7 +851,7 @@ breeze prod-image verify --image-name 
apache/airflow:${VERSION}
 ## Publish final documentation
 
 Documentation is an essential part of the product and should be made available 
to users.
-In our cases, documentation for the released versions is published in the live 
S3 bucket, and the site is
+In our cases, documentation for the released versions is published in the 
`live` S3 bucket, and the site is
 kept in a separate repository - 
[`apache/airflow-site`](https://github.com/apache/airflow-site),
 but the documentation source code and build tools are available in the 
`apache/airflow` repository, so
 you need to run several workflows to publish the documentation. More details 
about it can be found in
@@ -864,8 +865,11 @@ There are two steps to publish the documentation:
 The release manager publishes the documentation using GitHub Actions workflow
 [Publish Docs to 
S3](https://github.com/apache/airflow/actions/workflows/publish-docs-to-s3.yml).
 
-You should specify the final tag to build the docs and 'apache-airflow 
docker-stack' should be
-passed as packages to be built. The Live bucket should be selected as 
destination location.
+The release manager publishes the documentation using GitHub Actions workflow
+[Publish Docs to 
S3](https://github.com/apache/airflow/actions/workflows/publish-docs-to-s3.yml).
 By
+default `auto` selection should publish to the `live` bucket - based on
+the tag you use - pre-release tags go to staging. But you can also override it 
and specify the destination
+manually to be `live` or `staging`.
 
 After that step, the provider documentation should be available under the 
https://airflow.apache.org/ URL
 (also linked directly from the PyPI packages) but stable links and drop-down 
boxes should not be yet updated.
diff --git a/dev/README_RELEASE_HELM_CHART.md b/dev/README_RELEASE_HELM_CHART.md
index efc55caf920..ff58a5957b4 100644
--- a/dev/README_RELEASE_HELM_CHART.md
+++ b/dev/README_RELEASE_HELM_CHART.md
@@ -293,13 +293,19 @@ emergency cases.
 
 There are two steps to publish the documentation:
 
-1. Publish the documentation to the staging S3 bucket.
+1. Publish the documentation to the `staging` S3 bucket.
 
 The release manager publishes the documentation using GitHub Actions workflow
 [Publish Docs to 
S3](https://github.com/apache/airflow/actions/workflows/publish-docs-to-s3.yml).
 
 You can specify the RC tag to use to build the docs and 'helm-chart' passed as 
packages to be built.
 
+The release manager publishes the documentation using GitHub Actions workflow
+[Publish Docs to 
S3](https://github.com/apache/airflow/actions/workflows/publish-docs-to-s3.yml).
 By
+default `auto` selection should publish to the `staging` bucket - based on
+the tag you use - pre-release tags go to staging. But you can also override it 
and specify the destination
+manually to be `live` or `staging`.
+
 After that step, the provider documentation should be available under the 
https://airflow.staged.apache.org
 (same as in the helm chart documentation).
 
@@ -727,12 +733,18 @@ emergency cases.
 
 There are two steps to publish the documentation:
 
-1. Publish the documentation to the live S3 bucket.
+1. Publish the documentation to the `live` S3 bucket.
 
 The release manager publishes the documentation using GitHub Actions workflow
 [Publish Docs to 
S3](https://github.com/apache/airflow/actions/workflows/publish-docs-to-s3.yml).
 
-You can specify the tag to use to build the docs and 'helm-chart' passed as 
packages to be built.
+You should specify the tag to use to build the docs and 'helm-chart' passed as 
packages to be built.
+
+The release manager publishes the documentation using GitHub Actions workflow
+[Publish Docs to 
S3](https://github.com/apache/airflow/actions/workflows/publish-docs-to-s3.yml).
 By default
+`auto` selection should publish to the `live` bucket - based on
+the tag you use - pre-release tags go to staging. But you can also override it 
and specify the destination
+manually to be `live` or `staging`.
 
 After that step, the provider documentation should be available under the 
https://airflow.apache.org
 (same as in the helm chart documentation).
diff --git a/dev/README_RELEASE_PROVIDERS.md b/dev/README_RELEASE_PROVIDERS.md
index f3f507b9de5..2ebf73aaadd 100644
--- a/dev/README_RELEASE_PROVIDERS.md
+++ b/dev/README_RELEASE_PROVIDERS.md
@@ -1197,7 +1197,7 @@ breeze release-management tag-providers
 ## Publish final documentation
 
 Documentation is an essential part of the product and should be made available 
to users.
-In our cases, documentation for the released versions is published in the live 
S3 bucket, and the site is
+In our cases, documentation for the released versions is published in the 
`live` S3 bucket, and the site is
 kept in a separate repository - 
[`apache/airflow-site`](https://github.com/apache/airflow-site),
 but the documentation source code and build tools are available in the 
`apache/airflow` repository, so
 you need to run several workflows to publish the documentation. More details 
about it can be found in
@@ -1213,8 +1213,13 @@ The release manager publishes the documentation using 
GitHub Actions workflow
 
 You should specify the final tag to use to build the docs and list of 
providers to publish
 (separated by spaces) or ``all-providers`` in case you want to publish all 
providers
-(optionally you can exclude some of those providers). You should use `live` 
bucket to publish the final
-release documentation.
+(optionally you can exclude some of those providers).
+
+The release manager publishes the documentation using GitHub Actions workflow
+[Publish Docs to 
S3](https://github.com/apache/airflow/actions/workflows/publish-docs-to-s3.yml).
+By default `auto` selection should publish to the `live` bucket - based on
+the tag you use - pre-release tags go to staging. But you can also override it 
and specify the destination
+manually to be `live` or `staging`.
 
 After that step, the provider documentation should be available under the 
http://airflow.apache.org URL
 (also present in the PyPI packages) but stable links and drop-down boxes 
should not be yet updated.
diff --git a/docs/README.md b/docs/README.md
index 59f0bd379ef..914672b6af9 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -101,7 +101,7 @@ differences are:
   effectively to the staging site.
 
 Documentation of pre-release versions of Airflow distributions should be 
published to the staging s3
-bucket so that we can test the documentation before we publish it to the live 
bucket.
+bucket so that we can test the documentation before we publish it to the 
`live` bucket.
 
 # Typical workflows
 
@@ -116,9 +116,16 @@ The same workflow can be used to publish Airflow, Helm 
chart and providers docum
 This workflow is used twice:
 
 * when pre-release distributions are prepared (alpha/beta/rc) - the 
documentation should be published to
-  the staging bucket and staging site should be built and published.
-* when final releases of distributions are prepared - the documentation should 
be published to the live
-  bucket and the live website should be built and published.
+  the `staging` bucket and `staging` site should be built and published.
+* when final releases of distributions are prepared - the documentation should 
be published to the `live`
+  bucket and the `live` website should be built and published.
+
+When release manager publishes the documentation they choose `auto` 
destination by default - depending on the
+tag they use - `staging` will be used to publish from pre-release tag and 
`live` will be used ot publish
+from the release tag.
+
+You can also specify whether `live` or `staging` documentation should be 
published manually - overriding
+the auto-detection.
 
 The person who triggers the build (release manager) should specify the tag 
name of the docs to be published
 and the list of documentation packages to be published. Usually it is:
@@ -131,9 +138,6 @@ Optionally - specifically if we run `all-providers` and 
release manager wants to
 they can specify documentation packages to exclude. Leaving "no-docs-excluded" 
will publish all packages
 specified to be published without exclusions.
 
-You can also specify whether "live" or "staging" documentation should be 
published. The default is "live". In
-the future we might add `auto` setting that will publish to "live" or 
"staging" depending on the tag
-used to trigger the workflow.
 
 Example screenshot of the workflow triggered from the GitHub UI:
 
@@ -152,6 +156,8 @@ This will build the website and publish it to the `publish` 
branch of `airflow-s
 site) or `publish-staging` branch, (for `staging` site). The workflow will 
also update the website with
 including refreshing of the version numbers in the drop-downs and stable links.
 
+The `staging` documentation is produced automatically with `staging` watermark 
added.
+
 ![Publishing site](images/publish_site.png)
 
 This workflow also invalidates cache in Fastly that Apache Software Foundation 
uses to serve the website,
diff --git a/docs/images/publish_airflow.png b/docs/images/publish_airflow.png
index 78c01fffe51..7d1c1f30fce 100644
Binary files a/docs/images/publish_airflow.png and 
b/docs/images/publish_airflow.png differ
diff --git a/docs/images/sync_github_to_s3.png 
b/docs/images/sync_github_to_s3.png
index 8d6a02430dd..690b22fdb14 100644
Binary files a/docs/images/sync_github_to_s3.png and 
b/docs/images/sync_github_to_s3.png differ

Reply via email to