From d33942cc23d2d09e45a20f7f9ea2db9f6759b736 Mon Sep 17 00:00:00 2001 From: asepharyana Date: Sat, 1 Aug 2026 16:58:20 +0700 Subject: [PATCH] =?UTF-8?q?ci:=20restore=20legacy=20.github=20workflows=20?= =?UTF-8?q?(era=20GitHub=20asli)=20=E2=80=94=20hapus=20hanya=20jika=20mema?= =?UTF-8?q?ng=20mirror-only?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..62e557f --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,35 @@ +name: Deploy to VPS + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Deploy via SSH + uses: appleboy/ssh-action@v1.0.3 + env: + ENV_FILE: ${{ secrets.ENV_FILE }} + with: + host: ${{ secrets.VPS_HOST }} + username: ${{ secrets.VPS_USERNAME }} + key: ${{ secrets.VPS_SSH_KEY }} + envs: ENV_FILE + script: | + cd /opt/imphenbot || exit + + # Pull latest changes + git pull origin main + + # Write environment variables from GitHub Secrets + echo "$ENV_FILE" > .env + + # Build and restart containers + docker-compose up -d --build