diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2020-05-30 20:45:54 +0200 |
---|---|---|
committer | Kamil Doległo <9080183+kamildoleglo@users.noreply.github.com> | 2020-06-16 13:04:26 +0200 |
commit | 82a09064511efc202f8b6c9bc7341f880dc36c66 (patch) | |
tree | 6948ee53104d2c4d3e113e7ea865ff5e9f15734a | |
parent | 343eace38c4f26ced0de70b413174a2a77dbf5ec (diff) | |
download | dokka-82a09064511efc202f8b6c9bc7341f880dc36c66.tar.gz dokka-82a09064511efc202f8b6c9bc7341f880dc36c66.tar.bz2 dokka-82a09064511efc202f8b6c9bc7341f880dc36c66.zip |
Add documenting of stdlib and publishing to s3 on branch push
-rw-r--r-- | .github/workflows/s3-snapshots.yml | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/.github/workflows/s3-snapshots.yml b/.github/workflows/s3-snapshots.yml new file mode 100644 index 00000000..b7610783 --- /dev/null +++ b/.github/workflows/s3-snapshots.yml @@ -0,0 +1,49 @@ +name: S3-snapshots + +on: push + +env: + branch-name: ${GITHUB_REF#refs/heads/} + bucket-name: 'dokka-snapshots' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout dokka + uses: actions/checkout@v2 + with: + path: dokka + + - uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Publish dokka locally + run: ./gradlew clean publishToMavenLocal --stacktrace + working-directory: ./dokka + + - name: Checkout stdlib + uses: actions/checkout@v2 + with: + repository: 'kamildoleglo/kotlin-dokka-stdlib' + ref: 'master' + path: stdlib + + - name: Document stdlib + run: ./gradlew clean callDokka --stacktrace + working-directory: ./stdlib + + - name: Configure AWS credentials for S3 access + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: eu-central-1 + + - name: Copy files to dokka's S3 bucket + run: | + aws s3 --recursive rm s3://${{ env.bucket-name }}/${{ env.branch-name }}/stdlib/prev + aws s3 --recursive mv s3://${{ env.bucket-name }}/${{ env.branch-name }}/stdlib/latest s3://${{ env.bucket-name }}/${{ env.branch-name }}/stdlib/prev + aws s3 sync ./stdlib/build/dokka s3://${{ env.bucket-name }}/${{ env.branch-name }}/stdlib/latest |