Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions workflow for CDN uploads #119

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/cdn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish to CDN
on:
workflow_dispatch:
inputs:
version:
description: "The release tag to use"
required: true
bucket:
description: "S3 bucket to upload to"
default: "prod-cdn.ably.com"
type: choice
options:
- "prod-cdn.ably.com"
- "nonprod-cdn.ably.com"

jobs:
publish:
runs-on: ubuntu-latest
# These permissions are necessary to run the configure-aws-credentials action
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.version }}
- uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::${{ secrets.ABLY_AWS_ACCOUNT_ID_SDK }}:role/prod-ably-sdk-cdn
aws-region: us-east-1
- name: Use Node.js 14.x
uses: actions/setup-node@v3
with:
node-version: 14.x
- run: npm run build
- run: |
aws s3 cp ./dist/iife/index.bundle.js s3://${{ github.event.inputs.bucket }}/spaces/${{ github.event.input.version }}/iife/index.bundle.js

Loading