From 6e0158e221ec5446e5df54d6aea7dbcc3ca8fc7b Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Thu, 5 Aug 2021 18:19:00 +0200 Subject: [PATCH] Auto-publish backported docs (#30422) * Auto-publish backported docs * publish docs on ubuntu 20.04 Co-authored-by: Ignasi Marimon-Clos * Use the latest 1.11 to publish docs Co-authored-by: Ignasi Marimon-Clos Co-authored-by: Ignasi Marimon-Clos --- .github/workflows/publish-docs.yml | 36 ++++++++++++++++++++++++++++++ .github/workflows/publish.yml | 26 --------------------- RELEASING.md | 12 ++++++---- 3 files changed, 44 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/publish-docs.yml diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml new file mode 100644 index 0000000000..bea56d0c01 --- /dev/null +++ b/.github/workflows/publish-docs.yml @@ -0,0 +1,36 @@ +name: Publish docs + +on: + push: + branches: + - master + # for testing the GH Action without merging to master, + # in some cases + - test-publish-snapshots + - docs/v* + tags: ["*"] + +jobs: + documentation: + name: Documentation + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + 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: Set up JDK 11 + uses: olafurpg/setup-scala@v10 + with: + java-version: adopt@1.11 + - name: Publish + run: |- + eval "$(ssh-agent -s)" + echo $SCP_SECRET | base64 -d > /tmp/id_rsa + chmod 600 /tmp/id_rsa + ssh-add /tmp/id_rsa + # using Scala 2.13 here to avoid the infamous problem with missing AskSupport in classpath + sbt -Dakka.build.scalaVersion=2.13.0 -Dakka.genjavadoc.enabled=true publishRsync + env: + SCP_SECRET: ${{ secrets.SCP_SECRET }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ce54f73367..277602133b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -35,29 +35,3 @@ jobs: SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} WHITESOURCE_PASSWORD: ${{ secrets.WHITESOURCE_PASSWORD }} - - # TODO publish gradle from here as well - - documentation: - name: Documentation - runs-on: ubuntu-18.04 - steps: - - name: Checkout - uses: actions/checkout@v2 - 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: Set up JDK 11 - uses: olafurpg/setup-scala@v10 - with: - java-version: adopt@1.11.0-9 - - name: Publish - run: |- - eval "$(ssh-agent -s)" - echo $SCP_SECRET | base64 -d > /tmp/id_rsa - chmod 600 /tmp/id_rsa - ssh-add /tmp/id_rsa - # using Scala 2.13 here to avoid the infamous problem with missing AskSupport in classpath - sbt -Dakka.build.scalaVersion=2.13.0 -Dakka.genjavadoc.enabled=true publishRsync - env: - SCP_SECRET: ${{ secrets.SCP_SECRET }} diff --git a/RELEASING.md b/RELEASING.md index f5d0916c42..70a331add0 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -66,19 +66,23 @@ sonatype. It is possible to release a revised documentation to the already existing release. -1. Create a new branch from a release tag. If a revised documentation is for the `v2.6.4` release, then the name of the new branch should be `docs/v2.6.4`. +1. Create a new branch from a release tag. If a revised documentation is for the `v2.6.4` release, then the name of the new branch should be `docs/v2.6.4`: + ``` + $ git checkout v2.6.4 + $ git checkout -b docs/v2.6.4 + ``` 1. Add and commit `version.sbt` file that pins the version to the one that is being revised. Also set `isSnapshot` to `false` for the stable documentation links. For example: ```scala ThisBuild / version := "2.6.4" ThisBuild / isSnapshot := false ``` -1. Make all of the required changes to the documentation. +1. Switch to a new branch for your documentation change, make the change 1. Build documentation locally with: ```sh sbt akka-docs/paradoxBrowse ``` -1. If the generated documentation looks good, send it to Gustav: +1. If the generated documentation looks good, create a PR to the `docs/v2.6.4` branch you created earlier: ```sh sbt akka-docs/publishRsync ``` -1. Do not forget to push the new branch back to GitHub. +1. It should automatically be published by GitHub Actions on merge.