Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 29 additions & 41 deletions .github/workflows/publish-docs-to-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,29 @@ on: # yamllint disable-line rule:truthy
description: "The branch or tag to checkout for the docs publishing"
required: true
type: string
include-docs:
description: |
Space separated list of docs to build.
To publish docs for nested provider packages, provide the package name with `.`
eg: amazon common.messaging apache.kafka

required: false
default: "all-providers"
type: string
exclude-docs:
description: "Comma separated list of docs to exclude"
required: false
default: "NO_DOCS"
default: "no-docs-excluded"
type: string
destination-location:
description: "The destination location in S3"
required: false
default: "s3://staging-docs-airflow-apache-org/docs"
type: string
docs-list-as-string:
description: "Space separated list of docs to build"
description: "The destination location in S3, default is live site"
required: false
default: ""
type: string
default: "s3://live-docs-airflow-apache-org/docs"
type: choice
options:
- s3://live-docs-airflow-apache-org/docs
- s3://staging-docs-airflow-apache-org/docs

env:
AIRFLOW_ROOT_PATH: "/home/runner/work/temp-airflow-repo-reference" # checkout dir for referenced tag
permissions:
Expand All @@ -48,15 +56,15 @@ jobs:
timeout-minutes: 10
name: "Build Info"
runs-on: ["ubuntu-24.04"]
outputs:
runners: ${{ steps.selective-checks.outputs.amd-runners }}
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
VERBOSE: true
REF: ${{ inputs.ref }}
INCLUDE_DOCS: ${{ inputs.include-docs }}
EXCLUDE_DOCS: ${{ inputs.exclude-docs }}
DESTINATION_LOCATION: ${{ inputs.destination-location }}
DOCS_LIST_AS_STRING: ${{ inputs.docs-list-as-string }}
outputs:
include-docs: ${{ inputs.include-docs == 'all' && '' || inputs.include-docs }}
if: contains(fromJSON('[
"ashb",
"eladkal",
Expand All @@ -74,29 +82,9 @@ jobs:
echo "Input parameters summary"
echo "========================="
echo "Ref: '${REF}'"
echo "Included docs : '${INCLUDE_DOCS}'"
echo "Exclude docs: '${EXCLUDE_DOCS}'"
echo "Destination location: '${DESTINATION_LOCATION}'"
echo "Docs list as string: '${DOCS_LIST_AS_STRING}'"
- name: "Cleanup repo"
shell: bash
run: docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
run: ./scripts/ci/cleanup_docker.sh
- name: "Install uv"
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: "Install Breeze"
uses: ./.github/actions/breeze
with:
use-uv: "true"
- name: Selective checks
id: selective-checks
env:
VERBOSE: "false"
run: breeze ci selective-check 2>> ${GITHUB_OUTPUT}

build-ci-images:
name: Build CI images
Expand All @@ -108,7 +96,7 @@ jobs:
# from forks. This is to prevent malicious PRs from creating images in the "apache/airflow" repo.
packages: write
with:
runners: ${{ needs.build-info.outputs.amd-runners }}
runners: '["ubuntu-22.04"]'
platform: "linux/amd64"
push-image: "false"
upload-image-artifact: "true"
Expand All @@ -122,7 +110,7 @@ jobs:
disable-airflow-repo-cache: false

build-docs:
needs: [build-ci-images]
needs: [build-ci-images, build-info]
timeout-minutes: 150
name: "Build documentation"
runs-on: ubuntu-latest
Expand All @@ -132,7 +120,7 @@ jobs:
GITHUB_USERNAME: ${{ github.actor }}
INCLUDE_NOT_READY_PROVIDERS: "true"
INCLUDE_SUCCESS_OUTPUTS: false
PYTHON_MAJOR_MINOR_VERSION: ${{ inputs.default-python-version }}
PYTHON_MAJOR_MINOR_VERSION: 3.9
VERBOSE: "true"
steps:
- name: "Cleanup repo"
Expand All @@ -156,9 +144,9 @@ jobs:
use-uv: true
- name: "Building docs with --docs-only flag"
env:
DOCS_LIST_AS_STRING: ${{ inputs.docs-list-as-string }}
INCLUDE_DOCS: ${{ needs.build-info.outputs.include-docs }}
run: >
breeze build-docs ${DOCS_LIST_AS_STRING} --docs-only
breeze build-docs ${INCLUDE_DOCS} --docs-only --include-commits
- name: "Upload build docs"
uses: actions/upload-artifact@v4
with:
Expand All @@ -169,7 +157,7 @@ jobs:
overwrite: 'true'

publish-docs-to-s3:
needs: [build-docs]
needs: [build-docs, build-info]
name: "Publish documentation to S3"
permissions:
id-token: write
Expand Down Expand Up @@ -220,10 +208,10 @@ jobs:
use-uv: true
- name: "Publish docs to tmp directory"
env:
DOCS_LIST_AS_STRING: ${{ inputs.docs-list-as-string }}
INCLUDE_DOCS: ${{ needs.build-info.outputs.include-docs }}
run: >
breeze release-management publish-docs --override-versioned --run-in-parallel
${DOCS_LIST_AS_STRING}
${INCLUDE_DOCS}
- name: Check disk space available
run: df -h
- name: "Generate back references for providers"
Expand Down
Loading