Bump the npm_and_yarn group across 1 directory with 21 updates #166
Workflow file for this run
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: dev-tool-box | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - feature/* | |
| - bugfix/* | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build application | |
| uses: cypress-io/github-action@v6 | |
| with: | |
| runTests: false | |
| build: npm run build:prod | |
| - name: Run ESLint | |
| run: npm run lint | |
| - name: Run unit tests | |
| run: npm run test:prod | |
| - name: Cache application | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-artifacts | |
| if-no-files-found: error | |
| path: dist/dev-tool-box/browser/ | |
| e2e: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download application | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-artifacts | |
| path: dist/dev-tool-box/browser/ | |
| - name: Run e2e tests | |
| uses: cypress-io/github-action@v6 | |
| with: | |
| start: npm run start | |
| wait-on: "http://localhost:4200" | |
| browser: chrome | |
| deploy: | |
| needs: [ build, e2e ] | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download application | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-artifacts | |
| path: dist/dev-tool-box/browser/ | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | |
| - name: Deploy application to S3 | |
| run: aws s3 sync dist/dev-tool-box/browser/ s3://${{ secrets.S3_BUCKET }} | |
| - name: Invalidate CloudFront cache | |
| run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*" |