edit github cd #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |