Skip to content

Commit b3fab86

Browse files
committed
project: add CDN deployment workflow
Deploy core UMD bundle to prod-cdn.ably.com on every GitHub release using the shared ably/cdn-deploy-action. Uses AWS OIDC federation for authentication. Versioned copies are uploaded (e.g. 0.0.2 -> 0, 0.0, 0.0.2) so consumers can pin to major/minor/patch.
1 parent 7103dab commit b3fab86

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/publish.cdn.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish to CDN
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
# These permissions are necessary to run the configure-aws-credentials action
11+
permissions:
12+
id-token: write
13+
contents: read
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
ref: ${{ github.ref }}
18+
- name: Configure AWS Credentials
19+
uses: aws-actions/configure-aws-credentials@v4
20+
with:
21+
aws-region: us-east-1
22+
role-to-assume: arn:aws:iam::${{ secrets.ABLY_AWS_ACCOUNT_ID_SDK }}:role/prod-ably-sdk-cdn
23+
role-session-name: ${{ github.run_id }}-${{ github.run_number }}
24+
- uses: actions/setup-node@v6
25+
with:
26+
node-version: 24
27+
cache: npm
28+
- run: npm ci
29+
- uses: ably/cdn-deploy-action@v1
30+
with:
31+
source-dir: dist
32+
file-regex: '^ably-ai-transport\.umd\.cjs$'
33+
tag: ${{ github.ref_name }}

0 commit comments

Comments
 (0)