Skip to content

Commit

Permalink
Merge pull request #8 from LetsExercise/feat-cicd
Browse files Browse the repository at this point in the history
[Feat] github action 작성 & scss 잘못된 변수 참조 제거
  • Loading branch information
Mule129 authored Aug 4, 2024
2 parents 3a31cc2 + a25bd7e commit b895365
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy to Linux Server

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

jobs:
deploy:
runs-on: ubuntu-latest

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

- name: Install sshpass
run: sudo apt-get install -y sshpass

- name: Deploy and start the project
env:
SSH_IP: ${{ secrets.SSH_IP }}
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }}
SSH_PORT: ${{ secrets.SSH_PORT }}
run: |
sshpass -p $SSH_PASSWORD ssh -o StrictHostKeyChecking=no -p $SSH_PORT castberry@$SSH_IP << 'EOF'
cd /home/castberry/dailypet
git pull
npm install
pm2 restart dailypet-dev || pm2 start npm --name "dailypet-dev" -- run start
EOF
18 changes: 18 additions & 0 deletions nginx.file
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
server {
listen 3650 ssl;
server_name castberry.kr;

ssl_certificate /etc/letsencrypt/live/castberry.kr/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/castberry.kr/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;

location / {
proxy_pass http://localhost:36500;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"dev": "next dev -p 36500",
"build": "next build",
"start": "next start",
"start": "next start -p 36500",
"lint": "next lint"
},
"dependencies": {
Expand Down
4 changes: 3 additions & 1 deletion src/app/mypage/page.module.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use '../../lib/styles/palette' as *;

.main{
}
}

0 comments on commit b895365

Please sign in to comment.