WebApp - Cambia estrategia de deploy con aws cli debug #19
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: Build and release React app | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- webapp/**/* | |
- .github/workflows/webApp.yml | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
cd webapp | |
yarn install | |
- name: Build project | |
run: | | |
cd webapp | |
yarn build | |
- name: Debug S3 bucket name | |
run: | | |
echo "S3 bucket name: ${{ secrets.S3_BUCKET_NAME }}" | |
- name: Deploy to S3 | |
run: | | |
aws s3 sync webapp/build/ s3://${{ secrets.S3_BUCKET_NAME }} --delete | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |