Create deploy.yml
This commit is contained in:
@@ -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"
|
||||||
Reference in New Issue
Block a user