Skip to content

Commit

Permalink
Merge pull request #36 from Romantic-Yeojido/feature/#33-add-deploy-p…
Browse files Browse the repository at this point in the history
…ipeline

Feature/#33 add deploy pipeline
  • Loading branch information
bulee5328 authored Dec 19, 2024
2 parents 195004e + 175ff2c commit 306b859
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
chmod 600 ~/.ssh/id_rsa
cat >>~/.ssh/config <<END
Host romactic-yeojido
Host romantic-yeojido
HostName $EC2_HOST
User $EC2_USER
IdentityFile ~/.ssh/id_rsa
Expand All @@ -33,17 +33,17 @@ jobs:

- name: Copy Workspace
run: |
ssh romactic-yeojido 'sudo mkdir -p /opt/app'
ssh romactic-yeojido 'sudo chown ubuntu:ubuntu /opt/app/'
scp -r ./[!.]* romactic-yeojido:/opt/app
ssh romantic-yeojido 'sudo mkdir -p /opt/app'
ssh romantic-yeojido 'sudo chown ubuntu:ubuntu /opt/app/'
scp -r ./[!.]* romantic-yeojido:/opt/app
- name: Install dependencies
run: |
ssh romactic-yeojido 'npm install --prefix /opt/app/'
ssh romantic-yeojido 'npm install --prefix /opt/app/'
- name: Copy systemd service file
run: |
ssh romactic-yeojido '
ssh romantic-yeojido '
echo "[Unit]
Description=UMC 7th Project
After=network.target
Expand All @@ -59,9 +59,9 @@ jobs:
- name: Enable systemd service
run: |
ssh romactic-yeojido 'sudo systemctl daemon-reload'
ssh romactic-yeojido 'sudo systemctl enable app'
ssh romantic-yeojido 'sudo systemctl daemon-reload'
ssh romantic-yeojido 'sudo systemctl enable app'
- name: Restart systemd service
run: |
ssh romactic-yeojido 'sudo systemctl restart app'
ssh romantic-yeojido 'sudo systemctl restart app'

0 comments on commit 306b859

Please sign in to comment.