Skip to content

Commit

Permalink
feat: deploy.yml 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
youseokhwan committed Feb 14, 2025
1 parent 315f4ec commit 3bab210
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,21 @@ name: Deploy to Netlify
on:
push:
branches:
- main # main 브랜치에 푸시될 때마다 실행
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules-
- name: Install dependencies
run: npm install

Expand All @@ -34,7 +26,7 @@ jobs:

- name: Create deploy branch
run: |
git checkout -b deploy # deploy 브랜치를 생성하고 체크아웃
git add public # public 폴더를 추가
git checkout -b deploy
git add public
git commit -m "Deploy build files"
git push --force origin deploy # deploy 브랜치에 푸시
git push --force origin deploy

0 comments on commit 3bab210

Please sign in to comment.