opengraph 이미지 교체 (#63) #7
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: Build and Deploy (Dev) | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: deploy-dev | |
cancel-in-progress: true | |
jobs: | |
Deploy: | |
runs-on: ubuntu-latest | |
environment: dev | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3.3.0 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3.6.0 | |
with: | |
node-version: 18.x | |
cache: yarn | |
- name: Install dependencies | |
run: yarn | |
- name: Build | |
run: yarn build:dev | |
- name: Upload to S3 | |
uses: jakejarvis/s3-sync-action@master | |
with: | |
args: --delete | |
env: | |
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: "ap-northeast-2" | |
SOURCE_DIR: "out" | |
- name: Invalidate Cloudfront cache | |
uses: chetan/invalidate-cloudfront-action@v2 | |
env: | |
DISTRIBUTION: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION }} | |
PATHS: "/*" | |
AWS_REGION: "ap-northeast-2" | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |