-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from AstarNetwork/ehsanhajian-CI
Create S3 CI
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Deploy to AWS S3 | ||
'on': | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
id-token: write | ||
contents: read | ||
jobs: | ||
build_and_deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
cache: 'yarn' | ||
|
||
- name: Install and build | ||
run: | | ||
yarn install --frozen-lockfile | ||
yarn build | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1.7.0 | ||
with: | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | ||
role-session-name: GitHubActions | ||
|
||
- name: Deploy app build to S3 bucket | ||
run: aws s3 sync ./build s3://astar-community-tutorials --delete |