feat(repo): enforce schema validation on api return #484
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
name: Deployment to AWS S3 | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
build_and_deploy_job: | |
runs-on: ubuntu-latest | |
name: Build and deploy | |
steps: | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: npm i | |
- name: Build Angular & NestJS | |
run: npm run build | |
- name: Output content of build folder | |
run: ls -l build | |
- name: Generate build tar | |
run: tar -cf build.tar build package.json package-lock.json | |
# - name: Deploy master branch to S3 | |
# if: github.ref == 'refs/heads/master' | |
# run: aws s3 sync ./build.tar ${{ secrets.AWS_SECRET_S3_BUCKET }} --delete | |
# | |
# - name: Deploy PR branch to S3 | |
# if: github.event_name == 'pull_request' | |
# run: aws s3 sync ./build.tar ${{ secrets.AWS_SECRET_S3_BUCKET }}/test/${{ github.event.number }} --delete | |
# - name: Invalidate CloudFront | |
# run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DISTRIBUTION_ID }} --paths "/*" |