chore: bump @types/node #145
This file contains hidden or 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: Deploy Angular App to S3 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| name: Build and Deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 22 | |
| - name: Install Dependencies | |
| run: npm install | |
| - name: Build | |
| run: npm run build-prod | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v2 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: eu-west-1 | |
| - name: Upload to S3 | |
| run: | | |
| cd dist/simsafari-lodge-booking/browser && cp index.html 404.html | |
| aws s3 sync . s3://www.${{ secrets.DOMAIN_NAME }} | |
| - name: Invalidate Cloudfront Cache | |
| run: | | |
| AWS_DISTRIBUTIONS=$(aws cloudfront list-distributions) | |
| AWS_DISTRIBUTION_ID=$( echo $AWS_DISTRIBUTIONS | jq -r '.DistributionList.Items | map(select(any(.Aliases.Items[]; contains("www.${{ secrets.DOMAIN_NAME }}")))|.Id)[]') | |
| aws cloudfront create-invalidation --distribution-id $AWS_DISTRIBUTION_ID --paths "/*"; |