ci: genrate api documentation #11
Workflow file for this run
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: generate-api-documentation | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
jobs: | |
make: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Sage | |
uses: einride/sage/actions/setup@master | |
with: | |
go-version: 1.19 | |
- name: Setup Node | |
# Latest version `v3.7.0` contains a bug, see the following issue: | |
# https://github.com/actions/setup-node/issues/801 | |
uses: actions/setup-node@v3.6.0 | |
with: | |
node-version: 18 | |
#registry-url: https://registry.npmjs.org | |
#cache: "yarn" | |
#cache-dependency-path: frontend/yarn.lock | |
- name: Generate API Documentation | |
run: make generate-api-doc | |
- name: Upload API Documentation | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Extend API Documentation | |
path: | | |
api_*.pdf | |
- name: Authenticate to GCP prod | |
uses: google-github-actions/auth@v0 | |
with: | |
workload_identity_provider: "projects/792655533020/locations/global/workloadIdentityPools/github-actions/providers/github-actions" | |
service_account: terraform@e-extend-prod.iam.gserviceaccount.com | |
- id: 'upload-file' | |
uses: 'google-github-actions/upload-cloud-storage@v1' | |
with: | |
#path: '/path/to/file' | |
glob: 'api_*.pdf' | |
destination: 'api-document-bucket' |