Skip to content
Closed
Show file tree
Hide file tree
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
49 changes: 49 additions & 0 deletions .github/workflows/docs-check.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,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"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't do a filtering here, hm? The docs check will always run, even if there were no docs changes. But I guess that's a minor thing. 🤔

I checked with Azure: We have the following two subsequent nightly runs:

The following command shows that we're not touching any docs code. Still, the docs check was performed in #20260716.4.

$ git log 7757f2c..eda168e --oneline --name-only
eda168ef69b [FLINK-40138][tests] Drive JUnit 5 lifecycle when generating migration test snapshots (#28739)
flink-test-utils-parent/flink-migration-test-utils/pom.xml
flink-test-utils-parent/flink-migration-test-utils/src/main/java/org/apache/flink/test/migration/JUnit5TestEnvironment.java
flink-test-utils-parent/flink-migration-test-utils/src/main/java/org/apache/flink/test/migration/SnapshotGeneratorUtils.java

So, let's prepare the create a dedicated Jira subtask (with the context) and prepare this PR to make it mergable.

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 }}
Expand Down
Loading