-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/boostcampwm-2022/web05-S…
…leepyWoods into develop
- Loading branch information
Showing
4 changed files
with
180 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Backend CD | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
Auto-Deploy: | ||
name: Backend Deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: SSH RemoteCommands | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{secrets.SSH_HOST}} | ||
port: ${{secrets.SSH_PORT}} | ||
username: ${{secrets.SSH_USER}} | ||
password: ${{secrets.SSH_PASSWORD}} | ||
script: | | ||
cd /root/production/web05-SleepyWoods/backend | ||
git pull origin main | ||
npm install | ||
npm run build | ||
pm2 reload main |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Frontend CD | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
Auto-Deploy: | ||
name: Frontend Deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Node 설정 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "18.x" | ||
|
||
- name: node_modules 폴더 캐싱 | ||
uses: actions/cache@v2 | ||
id: cache | ||
with: | ||
path: "**/frontend/node_modules" | ||
key: ${{ runner.os }}-modules-${{ hashFiles('**/frontend/package-lock.json') }} | ||
|
||
- name: node_modules 폴더 캐시가 없다면 dependencies 설치 | ||
working-directory: "./frontend" | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: npm install | ||
|
||
- name: Client 소스 빌드 | ||
working-directory: "./frontend" | ||
run: npm run build | ||
|
||
- name: SCP 프로토콜을 통한 서버로 파일 전송 처리 | ||
uses: appleboy/scp-action@master | ||
with: | ||
host: ${{ secrets.SSH_HOST }} | ||
username: ${{ secrets.SSH_USER }} | ||
password: ${{ secrets.SSH_PASSWORD }} | ||
port: ${{ secrets.SSH_PORT }} | ||
source: "./frontend/dist/*" | ||
target: "/root/production/" |
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
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