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

Publish to new CDN bucket only #1460

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
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
22 changes: 1 addition & 21 deletions .github/workflows/publish-cdn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,6 @@ on:

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@v1
with:
role-to-assume: arn:aws:iam::${{ secrets.ABLY_AWS_ACCOUNT_ID_PRODUCTION }}:role/github-actions-sdk
aws-region: us-east-1
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- run: npm ci
- run: node scripts/cdn_deploy.js --skipCheckout --tag=${{ github.event.inputs.version }}
publish_sdk:
runs-on: ubuntu-latest
# These permissions are necessary to run the configure-aws-credentials action
permissions:
Expand All @@ -48,4 +28,4 @@ jobs:
with:
node-version: 14.x
- run: npm ci
- run: node scripts/cdn_deploy.js --bucket prod-cdn.ably.com --skipCheckout --tag=${{ github.event.inputs.version }}
- run: node scripts/cdn_deploy.js --skipCheckout --tag=${{ github.event.inputs.version }}
2 changes: 1 addition & 1 deletion scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Deploys correctly versioned code and source maps to the CDN.

Arguments:

* **--bucket**: The S3 bucket name to deploy to, defaults to `cdn.ably.io`.
* **--bucket**: The S3 bucket name to deploy to, defaults to `prod-cdn.ably.com`.
* **--root**: The base directory inside the bucket to deploy to, defaults to `lib`.
* **--path**: The local path to retrieve source files from. Defaults to `.`.
* **--includeDirs**: A comma separated list of directories to include. Defaults to `.`.
Expand Down
2 changes: 1 addition & 1 deletion scripts/cdn_deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const fs = require('fs');
const path = require('path');
const { exec } = require('child_process');
const argv = require('minimist')(process.argv.slice(2));
const S3_DEFAULT_BUCKET = 'cdn.ably.io';
const S3_DEFAULT_BUCKET = 'prod-cdn.ably.com';
const S3_DEFAULT_ROOT = 'lib';

async function run() {
Expand Down