Merge pull request #287 from codestates-seb/dev/fe #170
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
name: deployment | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-versions: [18.x] | |
steps: | |
- name: Checkout source code. | |
uses: actions/checkout@v2 | |
- name: Install Dependencies | |
run: | | |
cd client | |
npm config set legacy-peer-deps true | |
npm install | |
- name: Build | |
run: | | |
cd client | |
npm run build | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Deploy to S3 | |
run: aws s3 sync ./client/build s3://${{ secrets.DEV_AWS_S3_BUCKETNAME }} --delete |