-
Notifications
You must be signed in to change notification settings - Fork 22
65 lines (57 loc) · 4.37 KB
/
publish-nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Publish Nightly
on:
schedule:
- cron: "0 2 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
publish-nightly:
name: Publish docs nightly
runs-on: ubuntu-20.04
if: github.repository == 'apache/pekko-samples'
steps:
- name: Checkout
uses: actions/checkout@v4
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@v4
with:
distribution: temurin
java-version: 11
- name: Cache Coursier cache
uses: coursier/cache-action@v6
- 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 }}