Update post #494
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 | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| build-web: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Install Dependencies | |
| run: bun install --frozen-lockfile | |
| - run: bun run build | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v1 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} | |
| aws-region: eu-west-2 | |
| - name: Sync to S3 | |
| working-directory: dist/client | |
| run: aws s3 sync . s3://bjoernf.com --exclude='dynamic/*' --delete | |
| - name: Invalidate cache from CF | |
| run: | | |
| aws cloudfront create-invalidation \ | |
| --distribution-id EP23KDGK9RC0N \ | |
| --paths "/" "/*" |