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
4 changes: 4 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Issue
- #이슈번호
## Details
-
48 changes: 48 additions & 0 deletions .github/workflow/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI/CD Pipeline

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

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

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

- name: Install dependencies
run: npm install

- name: Build project
run: npm run build

- name: Prepare deployment package
run: |
mkdir -p build/deployment
cp -r dist/* build/deployment/

- name: Deploy to Home Server
uses: appleboy/scp-action@v0.0.1
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: "build/deployment/*"
target: "/home/anhye0n/web/tutorial_sejong/frontend/dist"

- name: Restart Nginx
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
sudo systemctl restart nginx