Skip to content

Publish Nightly

Publish Nightly #921

# 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.
name: Publish Nightly
on:
schedule:
- cron: "0 2 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
publish-nightly:
name: Publish docs nightly
runs-on: ubuntu-22.04
if: github.repository == 'apache/pekko-samples'
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves
fetch-depth: 0
- name: Setup Java 11
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: temurin
java-version: 11
- name: Cache Coursier cache
uses: coursier/cache-action@4e2615869d13561d626ed48655e1a39e5b192b3c # v6.4.7
- name: Run docs gen
run: cd docs-gen && sbt paradox
# Create directory structure upfront since rsync does not create intermediate directories otherwise
- name: Create nightly directory structure
run: |-
mkdir -p target/nightly-docs/docs/pekko-samples/${{ github.ref_name }}-snapshot/docs
mv docs-gen/pekko-sample-fsm-java/target/paradox/site/main target/nightly-docs/docs/pekko-samples/${{ github.ref_name }}-snapshot/docs/pekko-sample-fsm-java/
mv docs-gen/pekko-sample-cluster-docker-compose-java/target/paradox/site/main target/nightly-docs/docs/pekko-samples/${{ github.ref_name }}-snapshot/docs/pekko-sample-cluster-docker-compose-java/
mv docs-gen/pekko-sample-cluster-docker-compose-scala/target/paradox/site/main target/nightly-docs/docs/pekko-samples/${{ github.ref_name }}-snapshot/docs/pekko-sample-cluster-docker-compose-scala/
mv docs-gen/pekko-sample-fsm-scala/target/paradox/site/main target/nightly-docs/docs/pekko-samples/${{ github.ref_name }}-snapshot/docs/pekko-sample-fsm-scala/
mv docs-gen/pekko-sample-sharding-java/target/paradox/site/main target/nightly-docs/docs/pekko-samples/${{ github.ref_name }}-snapshot/docs/pekko-sample-sharding-java/
mv docs-gen/pekko-sample-sharding-scala/target/paradox/site/main target/nightly-docs/docs/pekko-samples/${{ github.ref_name }}-snapshot/docs/pekko-sample-sharding-scala/
mv docs-gen/pekko-sample-persistence-java/target/paradox/site/main target/nightly-docs/docs/pekko-samples/${{ github.ref_name }}-snapshot/docs/pekko-sample-persistence-java/
mv docs-gen/pekko-sample-persistence-scala/target/paradox/site/main target/nightly-docs/docs/pekko-samples/${{ github.ref_name }}-snapshot/docs/pekko-sample-persistence-scala/
mv docs-gen/pekko-sample-cluster-java/target/paradox/site/main target/nightly-docs/docs/pekko-samples/${{ github.ref_name }}-snapshot/docs/pekko-sample-cluster-java/
mv docs-gen/pekko-sample-cluster-scala/target/paradox/site/main target/nightly-docs/docs/pekko-samples/${{ github.ref_name }}-snapshot/docs/pekko-sample-cluster-scala/
mv docs-gen/pekko-sample-distributed-data-java/target/paradox/site/main target/nightly-docs/docs/pekko-samples/${{ github.ref_name }}-snapshot/docs/pekko-sample-distributed-data-java/
mv docs-gen/pekko-sample-distributed-data-scala/target/paradox/site/main target/nightly-docs/docs/pekko-samples/${{ github.ref_name }}-snapshot/docs/pekko-sample-distributed-data-scala/
mv docs-gen/pekko-sample-distributed-workers-scala/target/paradox/site/main target/nightly-docs/docs/pekko-samples/${{ github.ref_name }}-snapshot/docs/pekko-sample-distributed-workers-scala/
mv docs-gen/pekko-sample-kafka-to-sharding-scala/target/paradox/site/main target/nightly-docs/docs/pekko-samples/${{ github.ref_name }}-snapshot/docs/pekko-sample-kafka-to-sharding-scala/
mv docs-gen/pekko-sample-grpc-kubernetes-scala/target/paradox/site/main target/nightly-docs/docs/pekko-samples/${{ github.ref_name }}-snapshot/docs/pekko-sample-grpc-kubernetes-scala/
- name: Upload nightly docs
uses: ./.github/actions/sync-nightlies
with:
upload: true
switches: --archive --compress --update --delete --progress --relative
local_path: target/nightly-docs/./docs/pekko-samples/ # The intermediate dot is to show `--relative` which paths to operate on
remote_path: ${{ secrets.NIGHTLIES_RSYNC_PATH }}/pekko/
remote_host: ${{ secrets.NIGHTLIES_RSYNC_HOST }}
remote_port: ${{ secrets.NIGHTLIES_RSYNC_PORT }}
remote_user: ${{ secrets.NIGHTLIES_RSYNC_USER }}
remote_key: ${{ secrets.NIGHTLIES_RSYNC_KEY }}