Update colors from Figma (#829) #688
This file contains hidden or 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
name: On Push Branch "main" | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
defaults: | |
run: | |
shell: bash -eu -o pipefail {0} | |
jobs: | |
install-dependencies: | |
name: Install | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/pnpm | |
release-preview: | |
name: Release Preview | |
permissions: | |
contents: write | |
pull-requests: write | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
needs: | |
- install-dependencies | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/pnpm | |
- name: Create Release Pull Request | |
id: changesets | |
uses: changesets/action@06245a4e0a36c064a573d4150030f5ec548e4fcc | |
with: | |
title: Release Preview | |
commit: Version package | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
update-baseline-screenshots: | |
name: Update Baseline Screenshots | |
runs-on: ubuntu-latest | |
needs: | |
- install-dependencies | |
steps: | |
- name: Install AWS CLI | |
run: | | |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.22.35.zip" -o "awscliv2.zip" | |
echo "8119ccf67de875f39d386abea986738fa710be57e20d4df66fa99c7f7fd09997 awscliv2.zip" | sha256sum --check | |
unzip awscliv2.zip | |
sudo ./aws/install --update | |
- name: Configure AWS CLI | |
env: | |
CLOUDFLARE_R2_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY_ID }} | |
CLOUDFLARE_R2_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_R2_SECRET_ACCESS_KEY }} | |
# https://developers.cloudflare.com/r2/examples/aws/aws-cli | |
run: | | |
aws configure set region auto | |
aws configure set output json | |
aws configure set aws_access_key_id $CLOUDFLARE_R2_ACCESS_KEY_ID | |
aws configure set aws_secret_access_key $CLOUDFLARE_R2_SECRET_ACCESS_KEY | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/pnpm | |
- run: pnpm dlx [email protected] install --only-shell --with-deps chromium | |
- run: pnpm exec playwright test --update-snapshots | |
- run: aws s3 sync ./dist/playwright-baseline-screenshots s3://${{ vars.CLOUDFLARE_R2_BUCKET_NAME }}/baseline-screenshots --delete --endpoint-url ${{ vars.CLOUDFLARE_R2_ENDPOINT }} | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
needs: | |
- install-dependencies | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/pnpm | |
- name: Build Storybook | |
run: pnpm start | |
env: | |
BASE_URL: main | |
NODE_ENV: production | |
- name: Upload Storybook | |
uses: actions/upload-artifact@v4 | |
with: | |
name: storybook | |
path: dist/storybook | |
deploy-storybook: | |
name: Deploy Storybook | |
# Ubuntu instead of MacOS because the performance difference is | |
# negligible and Ubuntu includes the AWS CLI. | |
runs-on: ubuntu-latest | |
needs: | |
- install-dependencies | |
- build | |
steps: | |
- name: Download Storybook | |
uses: actions/download-artifact@v4 | |
with: | |
name: storybook | |
path: storybook | |
# TODO: Remove after this is resolved: https://www.cloudflarestatus.com/incidents/t5nrjmpxc1cj | |
- name: Install AWS CLI | |
run: | | |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.22.35.zip" -o "awscliv2.zip" | |
echo "8119ccf67de875f39d386abea986738fa710be57e20d4df66fa99c7f7fd09997 awscliv2.zip" | sha256sum --check | |
unzip awscliv2.zip | |
sudo ./aws/install --update | |
- name: Configure AWS CLI | |
env: | |
CLOUDFLARE_R2_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY_ID }} | |
CLOUDFLARE_R2_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_R2_SECRET_ACCESS_KEY }} | |
# https://developers.cloudflare.com/r2/examples/aws/aws-cli | |
run: | | |
aws configure set region auto | |
aws configure set output json | |
aws configure set aws_access_key_id $CLOUDFLARE_R2_ACCESS_KEY_ID | |
aws configure set aws_secret_access_key $CLOUDFLARE_R2_SECRET_ACCESS_KEY | |
- name: Deploy Storybook | |
run: aws s3 sync ./storybook s3://${{ vars.CLOUDFLARE_R2_BUCKET_NAME }}/main --endpoint-url ${{ vars.CLOUDFLARE_R2_ENDPOINT }} |