Skip to content

chore(project): create framework subdirectory for web components (#303) #285

chore(project): create framework subdirectory for web components (#303)

chore(project): create framework subdirectory for web components (#303) #285

name: Publish CDN artifacts (canary) to S3
on:
push:
branches:
- main
concurrency:
group: deploy-${{ github.ref }}
cancel-in-progress: true
jobs:
web-components:
if: github.repository == 'carbon-design-system/carbon-labs'
runs-on: ubuntu-latest
defaults:
run:
working-directory: 'packages/web-components'
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 src/components/**/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/web-components'