Create cd.yml
This commit is contained in:
26
.github/workflows/cd.yml
vendored
Normal file
26
.github/workflows/cd.yml
vendored
Normal 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
|
||||
Reference in New Issue
Block a user