Skip to content

edit github cd

edit github cd #2

Workflow file for this run

name: Node.js CD
on:
push:
branches: [ "main", "dev" ]
jobs:
build:
runs-on: ubuntu-latest
environment: main
steps:
- name: deploy to vps using ssh
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
port: 22
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
key: ${{ secrets.PRIVATE_KEY }}
script: |
cd ~/.apps/zannime
git pull
git status
sudo docker compose -f docker-compose.yaml build
sudo docker compose -f docker-compose.yaml up -d
dev-build:
runs-on: ubuntu-latest
environment: main
steps:
- name: deploy to vps using ssh for dev
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
port: 22
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
key: ${{ secrets.PRIVATE_KEY }}
script: |
cd ~/.apps/zannime-dev
git pull
git status
sudo docker compose -f docker-compose-dev.yaml build
sudo docker compose -f docker-compose-dev.yaml up -d