Trim and update change log sections #1142
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will only run on push to the main branch. It will do a clean install of node dependencies, build the source code and deploy to S3. | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Deploy | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: szenius/[email protected] | |
with: | |
timezoneLinux: "America/New_York" | |
timezoneMacos: "America/New_York" | |
timezoneWindows: "America/New_York" | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Check Memory Limit | |
run: node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))' | |
- name: Set Swap Space | |
uses: pierotofy/set-swap-space@master | |
with: | |
swap-size-gb: 12 | |
- name: Cache multiple paths | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ids-enterprise-wc-038 | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build and Compile | |
run: npm run build:coverage | |
- name: Install Browsers | |
run: npx playwright install --with-deps | |
- name: Run Tests | |
run: npm run test:coverage:ci | |
env: | |
NODE_OPTIONS: "--max-old-space-size=8192" | |
- name: Run Tests (percy) | |
run: npx percy exec -- npx playwright test --grep "percy" | |
env: | |
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} | |
NODE_OPTIONS: "--max-old-space-size=8192" | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Re-Build for upload | |
run: npm run build | |
- name: Extract branch name | |
shell: bash | |
run: | | |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
id: extract_branch | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: Copy wc dist-demo files to S3 | |
run: | | |
branch_name=${{ steps.extract_branch.outputs.branch }} | |
echo "Deploying ${branch_name//./_}" | |
aws s3 cp build/development/ "s3://wc-demos/${branch_name//./_}" --recursive | |
aws configure set preview.cloudfront true | |
aws cloudfront create-invalidation --distribution-id E2Q51X0UO412XH --paths "/*" || true |