From 92611f2fe1200c3f53024080d8119ef6297b7a88 Mon Sep 17 00:00:00 2001 From: Moritz Utcke Date: Wed, 29 Mar 2023 07:41:12 +0200 Subject: [PATCH] Create cd.yml --- .github/workflows/cd.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 00000000..931978a6 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,26 @@ +name: Node.js CD + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Deploy using ssh + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + port: 22 + script: | + cd ~/home/root/apps/online-energieausweis + git pull origin main + git status + npm install --only=prod + pm2 restart online-energieausweis