This is an automated email from the ASF dual-hosted git repository. fcsaky pushed a commit to branch docs-ci-rsync-dev in repository https://gitbox.apache.org/repos/asf/flink-kubernetes-operator.git
commit fd1a28630252471849b0e138043e7eceecf0cdeb Author: Ferenc Csaky <[email protected]> AuthorDate: Mon Sep 29 12:48:58 2025 +0200 Rework doc build to not use shell script and Docker img --- .github/workflows/docs.sh | 53 --------------------------------------------- .github/workflows/docs.yaml | 41 ++++++++++++++++++++++++++++++++--- 2 files changed, 38 insertions(+), 56 deletions(-) diff --git a/.github/workflows/docs.sh b/.github/workflows/docs.sh deleted file mode 100755 index 079535dd..00000000 --- a/.github/workflows/docs.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -################################################################################ -# 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. -################################################################################ -set -e - -export JAVA_HOME=$JAVA_HOME_11_X64 - -# setup hugo -HUGO_REPO=https://github.com/gohugoio/hugo/releases/download/v0.104.0/hugo_extended_0.104.0_Linux-64bit.tar.gz -HUGO_ARTIFACT=hugo_extended_0.104.0_Linux-64bit.tar.gz -if ! curl --fail -OL $HUGO_REPO ; then - echo "Failed to download Hugo binary" - exit 1 -fi -tar -zxvf $HUGO_ARTIFACT -git submodule update --init --recursive -# generate docs into docs/target -./hugo -v --source docs --destination target -if [ $? -ne 0 ]; then - echo "Error building the docs" - exit 1 -fi - -# build Flink Operator; required for Javadoc step -#mvn clean install -B -DskipTests - -# build Java docs -mkdir -p docs/target/api -mvn javadoc:aggregate -B \ - -DadditionalJOption="-Xdoclint:none" \ - -DadditionalJOption="--allow-script-in-comments" \ - -DexcludePackageNames="org.apache.flink.examples" \ - -Dmaven.javadoc.failOnError=false \ - -Dcheckstyle.skip=true \ - -Dspotless.check.skip=true \ - -Denforcer.skip=true \ - -Dheader="<a href=\"http://flink.apache.org/\" target=\"_top\"><h1>Back to Flink Website</h1></a> <script>var _paq=window._paq=window._paq||[];_paq.push([\"disableCookies\"]),_paq.push([\"setDomains\",[\"*.flink.apache.org\",\"*.nightlies.apache.org/flink\"]]),_paq.push([\"trackPageView\"]),_paq.push([\"enableLinkTracking\"]),function(){var u=\"//matomo.privacy.apache.org/\";_paq.push([\"setTrackerUrl\",u+\"matomo.php\"]),_paq.push([\"setSiteId\",\"1\"]);var d=document, g=d.createEle [...] -mv target/site/apidocs docs/target/api/java diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index bc0514b2..4a2ee06e 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -23,6 +23,9 @@ jobs: build-documentation: if: github.repository == 'apache/flink-kubernetes-operator' runs-on: ubuntu-latest + env: + HUGO_REPO: https://github.com/gohugoio/hugo/releases/download/v0.104.0/hugo_extended_0.104.0_Linux-64bit.tar.gz + HUGO_ARTIFACT: hugo_extended_0.104.0_Linux-64bit.tar.gz strategy: max-parallel: 1 matrix: @@ -31,7 +34,12 @@ jobs: - release-1.13 - release-1.12 steps: - - uses: actions/checkout@v3 + - name: Set up Temurin JDK 17 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 17 + - uses: actions/checkout@v4 with: ref: ${{ matrix.branch }} - name: Set branch environment variable @@ -47,9 +55,36 @@ jobs: else echo "flink_alias=${currentBranch}" >> ${GITHUB_ENV} fi - - name: Build documentation + - name: Build documentation (no Docker) run: | - docker run --rm --volume "$PWD:/root/flink-kubernetes-operator" chesnay/flink-ci:java_8_11 bash -c "cd /root/flink-kubernetes-operator && ./.github/workflows/docs.sh" + if ! curl --fail -OL "$HUGO_REPO" ; then + echo "Failed to download Hugo binary" + exit 1 + fi + tar -zxvf "$HUGO_ARTIFACT" + git submodule update --init --recursive + + # generate docs into docs/target + ./hugo -v --source docs --destination target + if [ $? -ne 0 ]; then + echo "Error building the docs" + exit 1 + fi + + # build Java docs + mkdir -p docs/target/api + + mvn javadoc:aggregate -B \ + -DadditionalJOption="-Xdoclint:none" \ + -DadditionalJOption="--allow-script-in-comments" \ + -DexcludePackageNames="org.apache.flink.examples" \ + -Dmaven.javadoc.failOnError=false \ + -Dcheckstyle.skip=true \ + -Dspotless.check.skip=true \ + -Denforcer.skip=true \ + -Dheader="<a href=\"http://flink.apache.org/\" target=\"_top\"><h1>Back to Flink Website</h1></a> <script>var _paq=window._paq=window._paq||[];_paq.push([\"disableCookies\"]),_paq.push([\"setDomains\",[\"*.flink.apache.org\",\"*.nightlies.apache.org/flink\"]]),_paq.push([\"trackPageView\"]),_paq.push([\"enableLinkTracking\"]),function(){var u=\"//matomo.privacy.apache.org/\";_paq.push([\"setTrackerUrl\",u+\"matomo.php\"]),_paq.push([\"setSiteId\",\"1\"]);var d=document, g=d.cre [...] + + mv target/site/apidocs docs/target/api/java - name: Upload documentation uses: ./.github/actions/rsync-deployments with:
