Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Netlify Deploy

on:
push:
branches:
- main # 프로덕션 배포
- develop # 테스트 배포

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install dependencies
run: npm install

- name: Build project
run: npm run build

- name: Deploy to Netlify
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: '<Your Site ID>' # Netlify에서 제공된 Site ID
run: |
npm install -g netlify-cli
if [ "${{ github.ref_name }}" = "main" ]; then
netlify deploy --auth=$NETLIFY_AUTH_TOKEN --site=$NETLIFY_SITE_ID --prod --message "Production Deploy from main"
elif [ "${{ github.ref_name }}" = "develop" ]; then
netlify deploy --auth=$NETLIFY_AUTH_TOKEN --site=$NETLIFY_SITE_ID --branch=develop --message "Develop Deploy"
fi
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# Created by git for backups. To disable backups in Git:
# $ git config --global mergetool.keepBackup false
*.orig
.env

# Created by git when using merge tools for conflicts
*.BACKUP.*
Expand Down
Loading
Loading