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

Commit

Permalink
update cicd for v2-test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sotatek-TinnNguyen committed Dec 21, 2023
1 parent 906ff56 commit 5d04ce4
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: klaytn-docs-docusaurus dev deploy workflow
on:
push:
branches:
- v2-test

jobs:
deploy:
name: 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_TEST }}
role-session-name: SessionForKlaytnActions
aws-region: ${{ secrets.AWS_REGION }}

- name: Installing Node.js
uses: actions/setup-node@v3
with:
node-version: "18"

- name: Installing dependencies
run: |
yarn install
- name: Build static files
run: yarn build

- name: Sync to S3 bucket and validation cloudfront
env:
S3_BUCKET_DEV: ${{ secrets.S3_BUCKET_TEST }}
CLOUDFRONT_ID_DEV: ${{ secrets.CLOUDFRONT_ID_TEST }}
run: |
aws s3 sync ./build/ $S3_BUCKET_TEST --delete
aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_ID_TEST --paths "/*"

0 comments on commit 5d04ce4

Please sign in to comment.