Merge pull request #251 from cloudnativedaysjp/seaman/release_1718412… #36
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: Deploy Website to S3 | |
on: | |
push: | |
tags: | |
- v* | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: aws-actions/configure-aws-credentials@v3 | |
with: | |
aws-region: 'ap-northeast-1' | |
role-to-assume: 'arn:aws:iam::607167088920:role/github-actions' | |
- name: Install, build, and upload your site | |
uses: withastro/action@v0 | |
env: | |
NOTION_API_SECRET: ${{ secrets.NOTION_API_SECRET }} | |
DATABASE_ID: ${{ secrets.DATABASE_ID }} | |
- name: Deploy to S3 | |
run: aws s3 sync ./dist/ s3://${{ secrets.BUCKET_ID }} | |
- name: Create CloudFront invalidation | |
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths "/*" |