Skip to content

Commit d086e4f

Browse files
build: use OIDC flow for docs publish (#225)
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
1 parent d914d04 commit d086e4f

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

.github/workflows/docs.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
name: Publish API documentation
1+
name: Publish documentation
22

33
on:
44
push:
55
tags:
66
- v[0-9]+.[0-9]+.[0-9]+*
77

8-
permissions: {}
8+
permissions:
9+
id-token: write
10+
contents: read
911

1012
jobs:
1113
docs:
12-
runs-on: ubuntu-24
13-
environment:
14-
name: publish-docs
14+
runs-on: ubuntu-latest
15+
environment: docs-publish
1516
steps:
1617
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag: v4.2.2
1718
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # tag: v4.2.0
@@ -22,12 +23,14 @@ jobs:
2223
run: yarn --frozen-lockfile
2324
- name: Build API documentation
2425
run: yarn build:docs
26+
- name: Azure login
27+
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0
28+
with:
29+
client-id: ${{ secrets.AZURE_OIDC_CLIENT_ID }}
30+
tenant-id: ${{ secrets.AZURE_OIDC_TENANT_ID }}
31+
subscription-id: ${{ secrets.AZURE_OIDC_SUBSCRIPTION_ID }}
2532
- name: Upload to Azure Blob Storage
2633
uses: azure/cli@089eac9d8cc39f5d003e94f8b65efc51076c9cbd # tag: v2.1.0
2734
with:
28-
azcliversion: latest
2935
inlineScript: |
30-
az storage blob upload-batch --account-name $ACCOUNT_NAME -d '$web/notarize/${{ github.ref_name }}' -s ./docs --overwrite --sas-token "$SAS_TOKEN"
31-
env:
32-
SAS_TOKEN: ${{ secrets.SAS_TOKEN }}
33-
ACCOUNT_NAME: ${{ secrets.ACCOUNT_NAME }}
36+
az storage blob upload-batch --account-name ${{ secrets.AZURE_ECOSYSTEM_PACKAGES_STORAGE_ACCOUNT_NAME }} -d '$web/notarize/${{ github.ref_name }}' -s ./docs --overwrite --auth-mode login

0 commit comments

Comments
 (0)