fix sh #5
Workflow file for this run
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
# https://docs.github.com/en/actions/deployment/deploying-to-your-cloud-provider/deploying-to-amazon-elastic-container-service | |
name: Deployment | |
on: | |
push: | |
branches: | |
- main | |
- 32-add-deployment | |
env: | |
NODE_VERSION: 18.x | |
jobs: | |
deplyment: | |
name: Deployment | |
runs-on: ubuntu-latest | |
# environment: ${{ github.ref_name }} | |
environment: main | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install | |
run: yarn install | |
- name: Build | |
run: yarn build | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@0e613a0980cbf65ed5b322eb7a1e075d28913a83 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Upload to S3 | |
run: | | |
aws s3 sync ./build s3://${{ secrets.AWS_S3_BUCKET }} --exact-timestamps --delete --region ${{ secrets.AWS_REGION }} $* | |
- name: Invalidate cache | |
run: | | |
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }} --paths \"/*\" | |