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 2ed3420384256d12da5774e67f2c4429abbee4a6
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 | 11 +++++++----
 .github/workflows/s3-to-github.yml | 11 +++++++----
 scripts/github_to_s3.py            |  2 +-
 scripts/s3_to_github.py            |  2 +-
 4 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/github-to-s3.yml 
b/.github/workflows/github-to-s3.yml
index f81fa56b07..8d7f69c08f 100644
--- a/.github/workflows/github-to-s3.yml
+++ b/.github/workflows/github-to-s3.yml
@@ -22,9 +22,12 @@ 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
       local-path:
         description: "The location of the local folder to sync"
         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
       sync-type:
         description: "Perform a full sync or just sync the last commit"
@@ -105,6 +108,6 @@ jobs:
           ls -la
           python3 -m pip install uv
           uv run ./scripts/github_to_s3.py --bucket-path 
${{inputs.destination-location}} --local-path ${{inputs.local-path}} \
-          --document-folder ${{ inputs.document-folder || 'NO_DOCS' }} 
--commit-sha ${COMMIT_SHA} --sync-type ${{ inputs.sync-type }} \
+          --document-folder ${{ inputs.document-folder || 'all' }} 
--commit-sha ${COMMIT_SHA} --sync-type ${{ inputs.sync-type }} \
           --processes ${{ inputs.processes }}
         working-directory: /mnt/airflow-site-archive
diff --git a/.github/workflows/s3-to-github.yml 
b/.github/workflows/s3-to-github.yml
index e0854f35f5..dcb2df10e4 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: "NO_DOCS"
+        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 7760d74334..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 != "NO_DOCS":
+    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 47636d2b5d..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 != "NO_DOCS":
+    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