This repository was archived by the owner on May 12, 2026. It is now read-only.
fix(docker): add lib6-compat for compatibility and update prisma version #59
This file contains hidden or 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: 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!" |