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

Merge pull request #59 from ayo-klaytn/add/kaia-github-link #39

Merge pull request #59 from ayo-klaytn/add/kaia-github-link

Merge pull request #59 from ayo-klaytn/add/kaia-github-link #39

Workflow file for this run

name: metaverse-knowledge-kit dev deploy workflow
on:
push:
branches:
- main
jobs:
deploy:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Get AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_IAM_ROLE_ARN_DEV }}
role-session-name: SessionForKlaytnActions
aws-region: ${{ secrets.AWS_REGION_DEV }}
- name: Installing Node.js
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Installing dependencies
run: |
yarn install
- name: Build static files
env:
URL: ${{ secrets.URL_DEV }}
ORG: ${{ secrets.ORG }}
EMAIL: ${{ secrets.EMAIL }}
PROJECT: ${{ secrets.PROJECT }}
run: yarn build
- name: Sync to S3 bucket and validation cloudfront
env:
S3_BUCKET_DEV: ${{ secrets.S3_BUCKET_DEV }}
CLOUDFRONT_ID_DEV: ${{ secrets.CLOUDFRONT_ID_DEV }}
run: |
aws s3 sync ./build $S3_BUCKET_DEV --delete
aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_ID_DEV --paths "/*"