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

potiuk pushed a commit to branch change-free-type-to-choice
in repository https://gitbox.apache.org/repos/asf/airflow-site-archive.git

commit 7569f8185bdb0405188b543a66093f4846596404
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sat May 10 12:17:51 2025 +0200

    Make staging/live choice instead of free-type and fix full sync
---
 .github/workflows/github-to-s3.yml |  9 ++++++---
 .github/workflows/s3-to-github.yml | 11 +++++++----
 scripts/github_to_s3.py            |  2 +-
 scripts/s3_to_github.py            |  2 +-
 4 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/github-to-s3.yml 
b/.github/workflows/github-to-s3.yml
index e0249841d3..35a9a4adb0 100644
--- a/.github/workflows/github-to-s3.yml
+++ b/.github/workflows/github-to-s3.yml
@@ -22,13 +22,16 @@ on: # yamllint disable-line rule:truthy
     inputs:
       destination-location:
         description: "The destination location in S3"
-        required: false
+        required: true
+        type: choice
+        options:
+          - s3://live-docs-airflow-apache-org/docs/
+          - s3://staging-docs-airflow-apache-org/docs/
         default: "s3://live-docs-airflow-apache-org/docs/"
-        type: string
       document-folder:
         description: "Provide any specific package document folder to sync"
         required: false
-        default: ""
+        default: "all"
         type: string
       sync-type:
         description: "Perform a full sync or just sync the last commit"
diff --git a/.github/workflows/s3-to-github.yml 
b/.github/workflows/s3-to-github.yml
index 4070192fca..46afdc1e58 100644
--- a/.github/workflows/s3-to-github.yml
+++ b/.github/workflows/s3-to-github.yml
@@ -20,11 +20,14 @@ name: Sync S3 to GitHub
 on: # yamllint disable-line rule:truthy
   workflow_dispatch:
     inputs:
-      source-location:
+      destination-location:
         description: "The destination location in S3"
-        required: false
+        required: true
+        type: choice
+        options:
+          - s3://live-docs-airflow-apache-org/docs/
+          - s3://staging-docs-airflow-apache-org/docs/
         default: "s3://live-docs-airflow-apache-org/docs/"
-        type: string
       local-destination:
         description: "The local destination location"
         required: false
@@ -33,7 +36,7 @@ on: # yamllint disable-line rule:truthy
       document-folder:
         description: "Provide any specific package document folder to sync"
         required: false
-        default: ""
+        default: "all"
         type: string
       processes:
         description: "Number of processes to use for syncing"
diff --git a/scripts/github_to_s3.py b/scripts/github_to_s3.py
index b35bafb042..5ffefe14f8 100644
--- a/scripts/github_to_s3.py
+++ b/scripts/github_to_s3.py
@@ -124,7 +124,7 @@ if __name__ == "__main__":
 
     document_folder = args.document_folder
 
-    if document_folder and document_folder != "":
+    if document_folder and document_folder != "all":
         full_local_path = Path(f"{args.local_path}/{document_folder}")
         if not full_local_path.exists():
             full_local_path = 
Path(f"{args.local_path}/{convert_short_name_to_folder_name(document_folder)}")
diff --git a/scripts/s3_to_github.py b/scripts/s3_to_github.py
index f8240c4703..1188b83bec 100644
--- a/scripts/s3_to_github.py
+++ b/scripts/s3_to_github.py
@@ -73,7 +73,7 @@ if __name__ == "__main__":
     syncer.check_bucket()
     document_folder = args.document_folder
 
-    if document_folder and document_folder != "":
+    if document_folder and document_folder != "all":
         if syncer.verify_document_folder(document_folder):
             console.print(f"[blue] Document folder {document_folder} exists in 
bucket {args.bucket_path}.[/]")
             source_prefix = syncer.prefix.rstrip("/") + "/" + document_folder

Reply via email to