Skip to content

Commit

Permalink
upt
Browse files Browse the repository at this point in the history
  • Loading branch information
Julen-Smith authored Sep 12, 2023
1 parent 12a7aa5 commit 3253395
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/nodejs_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@ jobs:
- name: Deploy to server
run: |
ssh -i key.pem ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }} "\
sudo apt update && \
sudo apt install -y git curl && \
sudo apt update -y && \
sudo apt install -y git && \
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash - && \
sudo apt-get install -y nodejs && \
sudo npm install -g pm2 && \
cd /path/to && \
if [ ! -d \"app\" ]; then git clone https://github.com/Julen-Smith/CICD-Github-Actions app; fi && \
cd app && \
sudo apt install -y nodejs && \
git clone https://github.com/Julen-Smith/CICD-Github-Actions . && \
git checkout Aws_deploy && \
git pull origin Aws_deploy && \
npm install && \
sudo npm install pm2 -g && \
pm2 restart all || pm2 start app.js"


0 comments on commit 3253395

Please sign in to comment.