From fd6d69801b753d640b4260a142581aee446e0150 Mon Sep 17 00:00:00 2001 From: Dale Lane Date: Fri, 26 Jun 2026 10:10:02 +0100 Subject: [PATCH 1/4] [FLINK-40165][ci] Add docs check to Github Actions CI stage Adding a new workflow to make sure docs aren't broken as part of the Github Actions CI pipeline for pull requests. The goal is to achieve parity with the docs_404_check job that is included in the ci stage of the Azure Pipelines azure-pipelines.yml which I'm treating as a reference implementation. Signed-off-by: Dale Lane --- .github/workflows/docs-check.yml | 49 ++++++++++++++++++++++++++++++++ .github/workflows/nightly.yml | 12 ++++++++ 2 files changed, 61 insertions(+) create mode 100644 .github/workflows/docs-check.yml diff --git a/.github/workflows/docs-check.yml b/.github/workflows/docs-check.yml new file mode 100644 index 00000000000000..6fb20ece6c760e --- /dev/null +++ b/.github/workflows/docs-check.yml @@ -0,0 +1,49 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Runs the Hugo docs build and checks for broken links. Triggered only when +# docs/** files are changed, acting as a PR gate for documentation changes. +# +# This is the GHA equivalent of the docs_404_check job in the Azure Pipelines +# ci stage (tools/azure-pipelines/build-apache-repo.yml). Azure gates the check +# on pr_contains_docs_changes; here the workflow-level paths filter achieves the +# same effect without needing a per-step skip condition. + +name: "Docs 404 check (beta)" + +on: + pull_request: + paths: + - 'docs/**' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +permissions: read-all + +jobs: + docs-check: + name: "Docs 404 check" + runs-on: ubuntu-24.04 + steps: + - name: "Flink Checkout" + uses: actions/checkout@v5 + with: + persist-credentials: false + + - name: "Build docs and check for broken links" + run: ./tools/ci/docs.sh diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 70c6f8d09e606e..ba906bc2a0f73a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -77,6 +77,18 @@ jobs: s3_access_key: ${{ secrets.IT_CASE_S3_ACCESS_KEY }} s3_secret_key: ${{ secrets.IT_CASE_S3_SECRET_KEY }} + docs_check: + name: "Docs 404 check" + runs-on: ubuntu-24.04 + steps: + - name: "Flink Checkout" + uses: actions/checkout@v5 + with: + persist-credentials: false + + - name: "Build docs and check for broken links" + run: ./tools/ci/docs.sh + build_python_wheels: name: "Build Python Wheels on ${{ matrix.os_name }}" runs-on: ${{ matrix.os }} From d8c093de185ed223803196152f2513b012823715 Mon Sep 17 00:00:00 2001 From: Dale Lane Date: Thu, 23 Jul 2026 16:12:36 +0100 Subject: [PATCH 2/4] fix: reduce checkout to just the docs needed for docs build Signed-off-by: Dale Lane --- .github/workflows/docs-check.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docs-check.yml b/.github/workflows/docs-check.yml index 6fb20ece6c760e..0542e0feba7d06 100644 --- a/.github/workflows/docs-check.yml +++ b/.github/workflows/docs-check.yml @@ -44,6 +44,9 @@ jobs: uses: actions/checkout@v5 with: persist-credentials: false + sparse-checkout: | + docs + tools/ci/docs.sh - name: "Build docs and check for broken links" run: ./tools/ci/docs.sh From f51542f40464bc075ced395b9b96b6eb9aae2ba5 Mon Sep 17 00:00:00 2001 From: Dale Lane Date: Mon, 27 Jul 2026 22:47:18 +0100 Subject: [PATCH 3/4] chore: update version of checkout action Signed-off-by: Dale Lane --- .github/workflows/docs-check.yml | 2 +- .github/workflows/nightly.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs-check.yml b/.github/workflows/docs-check.yml index 0542e0feba7d06..09c4e38353cf87 100644 --- a/.github/workflows/docs-check.yml +++ b/.github/workflows/docs-check.yml @@ -41,7 +41,7 @@ jobs: runs-on: ubuntu-24.04 steps: - name: "Flink Checkout" - uses: actions/checkout@v5 + uses: actions/checkout@v7 with: persist-credentials: false sparse-checkout: | diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index ba906bc2a0f73a..a58a60d0b9003f 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -82,7 +82,7 @@ jobs: runs-on: ubuntu-24.04 steps: - name: "Flink Checkout" - uses: actions/checkout@v5 + uses: actions/checkout@v7 with: persist-credentials: false From 9e2e8d5ffc1125ed1bd1667ec44f4fc6d5556910 Mon Sep 17 00:00:00 2001 From: Dale Lane Date: Tue, 28 Jul 2026 20:04:31 +0100 Subject: [PATCH 4/4] fix: address review comment Signed-off-by: Dale Lane --- .github/workflows/nightly.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a58a60d0b9003f..22441ebf98b96f 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -85,6 +85,9 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false + sparse-checkout: | + docs + tools/ci/docs.sh - name: "Build docs and check for broken links" run: ./tools/ci/docs.sh