Skip to content

chore(deps): update actions/checkout action to v4.2.2 (#288) #278

chore(deps): update actions/checkout action to v4.2.2 (#288)

chore(deps): update actions/checkout action to v4.2.2 (#288) #278

name: Publish CDN artifacts (canary) to S3
on:
push:
branches:
- main
concurrency:
group: deploy-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
if: github.repository == 'carbon-design-system/carbon-labs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: '0'
- uses: fkirc/[email protected]
with:
github_token: ${{ github.token }}
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: '18.x'
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Build packages
run: yarn build
- name: Build dist folders in each package
run: yarn build:dist:canary
- name: Create one folder with dist contents from each package
run: |
mkdir dist
cp -r packages/*/dist/. dist/
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: ${{ secrets.COMMON_COS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.COMMON_COS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.COMMON_COS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.COMMON_COS_REGION }}
AWS_S3_ENDPOINT: https://${{ secrets.COMMON_COS_ENDPOINT }}
SOURCE_DIR: 'dist'
DEST_DIR: 'common/carbon/labs'