Create deploy.yml

This commit is contained in:
Fiqh Pratama
2025-10-11 21:55:29 +07:00
committed by GitHub
parent f8da120227
commit be11b809ee
+28
View File
@@ -0,0 +1,28 @@
name: Deploy to VPS
on:
push:
branches: ["main"]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout (optional)
uses: actions/checkout@v4
- name: Deploy to VPS via SSH
uses: appleboy/ssh-action@v1.0.0
with:
host: idc.upsense.co.id
username: root
port: 22
key: ${{ secrets.SSH_KEY }}
script_stop: true
envs: PROJECT_DIR,REPO_SSH
script: |
PROJECT_DIR="/var/www/html/xpendify.upsense.co.id"
REPO_SSH="git@github.com:upsense-id/TIA-Xpendify.git"
mkdir -p "$PROJECT_DIR"
/root/deploy.sh "$PROJECT_DIR" "$REPO_SSH"