Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

@ollion/flow-text-editor (#285) #319

@ollion/flow-text-editor (#285)

@ollion/flow-text-editor (#285) #319

Workflow file for this run

name: Build
on:
push:
branches:
- main
defaults:
run:
shell: bash
working-directory: .
env:
DISTRIBUTION_ID: E2ZI9E4QTG3PZ9
BUCKET_NAME: flow.ollion.com
AWS_REGION: us-east-1
ROLE_NAME: flow.ollion.com-role
ACCOUNT_ID: 679519065279
jobs:
build:
name: Build and upload to amazon s3
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 18.x
- name: Install pnpm
run: corepack enable && corepack prepare pnpm@8.9.0 --activate
- name: Install Dependencies and Build
run: make build
- name: Configure AWS credentials from Test account
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::${{env.ACCOUNT_ID}}:role/${{env.ROLE_NAME}}
aws-region: ${{env.AWS_REGION}}
- name: Check Access
run: |
aws sts get-caller-identity
- name: Copy files to the website with the AWS CLI
run: |
aws s3 sync storybook-static/ s3://${{env.BUCKET_NAME}}/v2/
- name: Invalidate CloudFront
run: |
aws cloudfront create-invalidation --distribution-id ${{env.DISTRIBUTION_ID}} --paths "/*"