Skip to content

Commit b5dbc11

Browse files
committed
build: use OIDC flow for docs publish
1 parent d6da0ac commit b5dbc11

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

.github/workflows/docs.yml

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
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
1819
with:
19-
node-version: lts/*
20+
node-version: 22.12.x
2021
- name: Install dependencies
2122
run: yarn --frozen-lockfile
2223
- name: Build API documentation
2324
run: yarn build:docs
25+
- name: Azure login
26+
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0
27+
with:
28+
client-id: ${{ secrets.AZURE_OIDC_CLIENT_ID }}
29+
tenant-id: ${{ secrets.AZURE_OIDC_TENANT_ID }}
30+
subscription-id: ${{ secrets.AZURE_OIDC_SUBSCRIPTION_ID }}
2431
- name: Upload to Azure Blob Storage
2532
uses: azure/cli@089eac9d8cc39f5d003e94f8b65efc51076c9cbd # tag: v2.1.0
2633
with:
27-
azcliversion: latest
2834
inlineScript: |
29-
az storage blob upload-batch --account-name $ACCOUNT_NAME -d '$web/notarize/${{ github.ref_name }}' -s ./docs --overwrite --sas-token "$SAS_TOKEN"
30-
env:
31-
SAS_TOKEN: ${{ secrets.SAS_TOKEN }}
32-
ACCOUNT_NAME: ${{ secrets.ACCOUNT_NAME }}
35+
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)