Merge pull request #2027 from finos/renovate/patch-updates #39
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: Build and Sync Advent of CALM | |
| permissions: | |
| contents: read | |
| on: | |
| workflow_dispatch: {} | |
| push: | |
| branches: ['main'] | |
| paths: ['advent-of-calm/**'] | |
| jobs: | |
| build-and-sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: "advent-of-calm/website" | |
| - name: Build website | |
| run: npm run build | |
| working-directory: "advent-of-calm/website" | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY }} | |
| aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-1 | |
| - name: Sync to S3 | |
| run: | | |
| aws s3 sync dist s3://${{ vars.AWS_S3_BUCKET }}/advent/ --delete | |
| working-directory: "advent-of-calm/website" | |
| - name: Invalidate CloudFront cache | |
| run: | | |
| aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --paths "/advent/*" |