Skip to content

Commit

Permalink
infra: 프론트엔드 개발 서버 CI/CD 구축 (#6)
Browse files Browse the repository at this point in the history
* infra: CI Workflow 작성

* infra: Dev-CD workflow 작성
  • Loading branch information
kdkdhoho authored Jan 26, 2024
1 parent 7db29ea commit 8832af5
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: FrontEnd CI

on:
pull_request:
branches: [main, dev]
# push:
# branches: [main, dev]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.11.0

- run: yarn install
- run: yarn build
30 changes: 30 additions & 0 deletions .github/workflows/Dev-CD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: FrontEnd Dev CD

on:
push:
branches: [ "dev" ]
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.11.0

- run: yarn install
- run: yarn build

- name: S3 and CloudFront Deploy
uses: Reggionick/s3-deploy@v4
with:
folder: .next
bucket: ${{ secrets.DEV_S3_BUCKET_NAME }}
bucket-region: ${{ secrets.AWS_DEFAULT_REGION }}
dist-id: ${{ secrets.DEV_CLOUDFRONT_ID }}

0 comments on commit 8832af5

Please sign in to comment.