Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

feat/podman-compose #54

feat/podman-compose

feat/podman-compose #54

Workflow file for this run

name: Production Pipeline
on:
push:
branches: [ "master" ]
paths:
- 'apps/bot/**'
- 'packages/**'
- 'pnpm-lock.yaml'
- 'ecosystem.config.js'
tags:
- "khaxyrewrite@*"
pull_request:
branches: [ "master" ]
workflow_dispatch:
permissions:
contents: read
pull-requests: write
jobs:
typecheck:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '22.16.0'
- uses: pnpm/action-setup@v2
with:
version: '10.11.1'
- run: pnpm install
- run: pnpm db:generate
- run: pnpm type-check
lint:
name: ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '22.16.0'
- uses: pnpm/action-setup@v2
with:
version: '10.11.1'
- run: pnpm install
- run: pnpm lint
deploy:
name: Deploy to VPS
runs-on: ubuntu-latest
needs: [typecheck, lint]
if: startsWith(github.ref, 'refs/tags/khaxy')
steps:
- name: SSH and Deploy
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.VPS_IP }}
username: ${{ secrets.VPS_USER }}
key: ${{ secrets.VPS_SSH_KEY }}
script: |
set -e # Stop script if any command fails
echo "🚀 Deploying version: ${GITHUB_REF_NAME}"
# 1. Go to project
cd ~/Khaxy
# 2. Get the specific version code
git fetch --all --tags
git checkout --force ${GITHUB_REF_NAME}
# 3. Build & Launch with Podman
podman-compose -f compose.yml up -d --build
# 4. Cleanup (Garbage Collection)
echo "🧹 Cleaning up old images..."
podman image prune -f
echo "✅ Deployment Complete!"