docs: Rebuild CLAUDE.md for Agent Zero God-Mode integration #14
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: Build & Deploy — VoxCode | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: deploy-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # ── Single job: build then deploy (avoids artifact upload overhead) ────────── | |
| deploy: | |
| name: Build & Deploy to Hostinger | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: next-infastructure-scrapers | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: next-infastructure-scrapers/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci --legacy-peer-deps | |
| - name: Type-check & Build | |
| env: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| CROWDSEC_API_KEY: ${{ secrets.CROWDSEC_API_KEY }} | |
| NEXT_PUBLIC_STRIPE_PAYMENT_LINK: ${{ secrets.NEXT_PUBLIC_STRIPE_PAYMENT_LINK }} | |
| NEXT_PUBLIC_APP_URL: ${{ secrets.NEXT_PUBLIC_APP_URL }} | |
| SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | |
| SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }} | |
| STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }} | |
| run: npm run build | |
| # ── Deploy via SSH — git pull + npm ci + pm2 restart on Hostinger VPS ── | |
| - name: Deploy via SSH | |
| uses: appleboy/ssh-action@v1.2.0 | |
| with: | |
| host: ${{ secrets.HOSTINGER_HOST }} | |
| username: ${{ secrets.HOSTINGER_USER }} | |
| key: ${{ secrets.HOSTINGER_SSH_KEY }} | |
| port: ${{ secrets.HOSTINGER_PORT || 22 }} | |
| script: | | |
| set -e | |
| APP_DIR="/home/${{ secrets.HOSTINGER_USER }}/openclaw" | |
| echo "── Pulling latest ──" | |
| cd "$APP_DIR" | |
| git fetch origin main | |
| git reset --hard origin/main | |
| echo "── Installing deps ──" | |
| cd next-infastructure-scrapers | |
| npm ci --legacy-peer-deps --omit=dev | |
| echo "── Building on server ──" | |
| ANTHROPIC_API_KEY="${{ secrets.ANTHROPIC_API_KEY }}" \ | |
| CROWDSEC_API_KEY="${{ secrets.CROWDSEC_API_KEY }}" \ | |
| NEXT_PUBLIC_APP_URL="${{ secrets.NEXT_PUBLIC_APP_URL }}" \ | |
| NEXT_PUBLIC_STRIPE_PAYMENT_LINK="${{ secrets.NEXT_PUBLIC_STRIPE_PAYMENT_LINK }}" \ | |
| SUPABASE_URL="${{ secrets.SUPABASE_URL }}" \ | |
| SUPABASE_ANON_KEY="${{ secrets.SUPABASE_ANON_KEY }}" \ | |
| STRIPE_SECRET_KEY="${{ secrets.STRIPE_SECRET_KEY }}" \ | |
| npm run build | |
| echo "── PM2 restart ──" | |
| pm2 restart voxcode --update-env 2>/dev/null || \ | |
| pm2 start npm --name voxcode -- run start | |
| pm2 save | |
| echo "── Done ──" | |
| - name: Notify success | |
| if: success() | |
| run: | | |
| curl -s -X POST "${{ secrets.SLACK_WEBHOOK_URL }}" \ | |
| -H "Content-Type: application/json" \ | |
| -d "{\"text\":\"✅ VoxCode deployed — \`${{ github.sha }}\` by ${{ github.actor }}\"}" | |
| - name: Notify failure | |
| if: failure() | |
| run: | | |
| curl -s -X POST "${{ secrets.SLACK_WEBHOOK_URL }}" \ | |
| -H "Content-Type: application/json" \ | |
| -d "{\"text\":\"❌ Deploy FAILED — ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}" |