|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 2 | +# contributor license agreements. See the NOTICE file distributed with |
| 3 | +# this work for additional information regarding copyright ownership. |
| 4 | +# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 5 | +# (the "License"); you may not use this file except in compliance with |
| 6 | +# the License. You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | + |
| 16 | +name: "Build legacy documentation" |
| 17 | +on: |
| 18 | + workflow_dispatch: |
| 19 | + inputs: |
| 20 | + branch: |
| 21 | + description: 'Branch to build documentation for' |
| 22 | + required: true |
| 23 | + type: choice |
| 24 | + options: |
| 25 | + - release-1.18 |
| 26 | + - release-1.17 |
| 27 | + - release-1.16 |
| 28 | + - release-1.15 |
| 29 | + - release-1.14 |
| 30 | + - release-1.13 |
| 31 | + |
| 32 | +jobs: |
| 33 | + build-documentation: |
| 34 | + if: github.repository == 'apache/flink' |
| 35 | + runs-on: ubuntu-latest |
| 36 | + steps: |
| 37 | + - uses: actions/checkout@v4 |
| 38 | + with: |
| 39 | + ref: ${{ inputs.branch }} |
| 40 | + |
| 41 | + - name: Set branch environment variable |
| 42 | + run: | |
| 43 | + echo "flink_branch=${{ inputs.branch }}" >> ${GITHUB_ENV} |
| 44 | +
|
| 45 | + - name: Cache Maven dependencies |
| 46 | + uses: actions/cache@v4 |
| 47 | + with: |
| 48 | + path: ~/.m2/repository |
| 49 | + key: ${{ runner.os }}-maven-docs-${{ hashFiles('**/pom.xml') }} |
| 50 | + restore-keys: | |
| 51 | + ${{ runner.os }}-maven-docs- |
| 52 | +
|
| 53 | + - name: Build documentation |
| 54 | + run: | |
| 55 | + docker run --rm \ |
| 56 | + --volume "$PWD:/root/flink" \ |
| 57 | + --volume "$HOME/.m2/repository:/root/.m2/repository" \ |
| 58 | + chesnay/flink-ci:java_8_11_17_21_maven_386_jammy \ |
| 59 | + bash -c "cd /root/flink && ./.github/workflows/docs.sh" |
| 60 | +
|
| 61 | + - name: Upload documentation |
| 62 | + uses: burnett01/rsync-deployments@0dc935cdecc5f5e571865e60d2a6cdc673704823 # 5.2 |
| 63 | + with: |
| 64 | + switches: --archive --compress --delete |
| 65 | + path: docs/target/ |
| 66 | + remote_path: ${{ secrets.NIGHTLIES_RSYNC_PATH }}/flink/flink-docs-${{ env.flink_branch }}/ |
| 67 | + remote_host: ${{ secrets.NIGHTLIES_RSYNC_HOST }} |
| 68 | + remote_port: ${{ secrets.NIGHTLIES_RSYNC_PORT }} |
| 69 | + remote_user: ${{ secrets.NIGHTLIES_RSYNC_USER }} |
| 70 | + remote_key: ${{ secrets.NIGHTLIES_RSYNC_KEY }} |
0 commit comments