Update README #489
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: API Reference | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
deployments: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Set up Go 1.19 | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.19 | |
- name: Download Packages | |
run: | | |
go install golang.org/x/tools/cmd/[email protected] | |
go install github.com/johnstarich/go/[email protected] | |
- uses: ably/sdk-upload-action@v2 | |
id: sdk-upload-prempt | |
with: | |
mode: preempt | |
sourcePath: dist | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
artifactName: godoc | |
- name: Build Documentation | |
run: > | |
gopages | |
-source-link "https://github.com/ably/ably-go/blob/${{ github.sha }}/ably/{{slice .Path 5}}{{if .Line}}#L{{.Line}}{{end}}" | |
-brand-description "Go client library for Ably realtime messaging service." | |
-brand-title "Ably Go SDK" | |
-base "${{steps.sdk-upload-prempt.outputs.url-base}}../godoc" | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-region: eu-west-2 | |
role-to-assume: arn:aws:iam::${{ secrets.ABLY_AWS_ACCOUNT_ID_SDK }}:role/ably-sdk-builds-ably-go | |
role-session-name: "${{ github.run_id }}-${{ github.run_number }}" | |
- name: Upload Documentation | |
uses: ably/sdk-upload-action@v2 | |
with: | |
sourcePath: dist | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
artifactName: godoc |