Skip to content

Commit

Permalink
Merge pull request #10 from AstarNetwork/ehsanhajian-CI
Browse files Browse the repository at this point in the history
Create S3 CI
  • Loading branch information
meganskye authored Jan 9, 2024
2 parents 7d68dc1 + d277850 commit 7127a58
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/main.yml
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

0 comments on commit 7127a58

Please sign in to comment.