Create cd.yml

This commit is contained in:
Moritz Utcke
2023-03-29 07:41:12 +02:00
committed by GitHub
parent 9ab5d076e7
commit 92611f2fe1

26
.github/workflows/cd.yml vendored Normal file
View File

@@ -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