|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +name: Publish 1.2 docs |
| 19 | + |
| 20 | +on: |
| 21 | + workflow_dispatch: |
| 22 | + |
| 23 | +jobs: |
| 24 | + publish-docs: |
| 25 | + name: Publish documentation to nightlies.apache.org |
| 26 | + runs-on: ubuntu-latest |
| 27 | + if: github.repository == 'apache/pekko-http' |
| 28 | + steps: |
| 29 | + - name: Checkout |
| 30 | + uses: actions/checkout@v4 |
| 31 | + with: |
| 32 | + fetch-depth: 0 |
| 33 | + fetch-tags: true |
| 34 | + |
| 35 | + - name: Set up JDK 8 |
| 36 | + uses: actions/setup-java@v4 |
| 37 | + with: |
| 38 | + distribution: temurin |
| 39 | + java-version: 8 |
| 40 | + |
| 41 | + - name: Install sbt |
| 42 | + uses: sbt/setup-sbt@v1 |
| 43 | + |
| 44 | + - name: Cache Coursier cache |
| 45 | + uses: coursier/cache-action@v6 |
| 46 | + |
| 47 | + - name: Build Documentation |
| 48 | + run: |- |
| 49 | + sbt -Dpekko.genjavadoc.enabled=true "set ThisBuild / version := \"1.2.0\"; docs/paradox; unidoc" |
| 50 | + env: |
| 51 | + JAVA_OPTS: "-verbose:gc -Xmx4g" |
| 52 | + |
| 53 | + # Create directory structure upfront since rsync does not create intermediate directories otherwise |
| 54 | + - name: Create directory structure |
| 55 | + run: |- |
| 56 | + mkdir -p target/nightly-docs/docs/pekko-http/1.2.0/ |
| 57 | + mkdir -p target/nightly-docs/docs/pekko-http/1.2/ |
| 58 | + cp -r docs/target/paradox/site/main/ target/nightly-docs/docs/pekko-http/1.2.0/docs |
| 59 | + cp -r docs/target/paradox/site/main/ target/nightly-docs/docs/pekko-http/1.2/docs |
| 60 | + rm -r docs/target/paradox/site/main/ |
| 61 | + cp -r target/scala-2.13/unidoc target/nightly-docs/docs/pekko-http/1.2.0/api |
| 62 | + cp -r target/scala-2.13/unidoc target/nightly-docs/docs/pekko-http/1.2/api |
| 63 | + rm -r target/scala-2.13/unidoc |
| 64 | + cp -r target/javaunidoc target/nightly-docs/docs/pekko-http/1.2.0/japi |
| 65 | + cp -r target/javaunidoc target/nightly-docs/docs/pekko-http/1.2/japi |
| 66 | + rm -r target/javaunidoc |
| 67 | +
|
| 68 | + - name: Upload 1.2.x nightly docs |
| 69 | + uses: ./.github/actions/sync-nightlies |
| 70 | + with: |
| 71 | + upload: true |
| 72 | + switches: --archive --compress --update --delete --progress --relative |
| 73 | + local_path: target/nightly-docs/./docs/pekko-http/1.2.0 # The intermediate dot is to show `--relative` which paths to operate on |
| 74 | + remote_path: ${{ secrets.NIGHTLIES_RSYNC_PATH }}/pekko/ |
| 75 | + remote_host: ${{ secrets.NIGHTLIES_RSYNC_HOST }} |
| 76 | + remote_port: ${{ secrets.NIGHTLIES_RSYNC_PORT }} |
| 77 | + remote_user: ${{ secrets.NIGHTLIES_RSYNC_USER }} |
| 78 | + remote_key: ${{ secrets.NIGHTLIES_RSYNC_KEY }} |
| 79 | + |
| 80 | + - name: Upload 1.2 nightly docs |
| 81 | + uses: ./.github/actions/sync-nightlies |
| 82 | + with: |
| 83 | + upload: true |
| 84 | + switches: --archive --compress --update --delete --progress --relative |
| 85 | + local_path: target/nightly-docs/./docs/pekko-http/1.2 # The intermediate dot is to show `--relative` which paths to operate on |
| 86 | + remote_path: ${{ secrets.NIGHTLIES_RSYNC_PATH }}/pekko/ |
| 87 | + remote_host: ${{ secrets.NIGHTLIES_RSYNC_HOST }} |
| 88 | + remote_port: ${{ secrets.NIGHTLIES_RSYNC_PORT }} |
| 89 | + remote_user: ${{ secrets.NIGHTLIES_RSYNC_USER }} |
| 90 | + remote_key: ${{ secrets.NIGHTLIES_RSYNC_KEY }} |
0 commit comments