deploy-vpslisted
Install: claude install-skill prinx/agents
# Deploy VPS
Deploy to a VPS using GitHub Actions and Docker. This is the simplest repeatable setup for VPS deployment: push to GitHub, GitHub Actions builds and deploys.
## Prerequisites
Before starting, confirm:
1. The project has a GitHub repository.
2. The user has a VPS with SSH access.
3. Docker is installed on the VPS (or will be installed).
## Step 1 — Check Docker on VPS
Ask: **Do you have Docker installed on your server?**
Run on the VPS: `docker --version`
If not installed, guide them:
- Ubuntu/Debian: `curl -fsSL https://get.docker.com | sh`
- Then: `sudo usermod -aG docker $USER` (they may need to log out and back in)
## Step 2 — Create Dockerfile
If the project does not have a `Dockerfile`, create one. Keep it simple:
```dockerfile
# Use the smallest appropriate base image
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./
EXPOSE 3000
CMD ["node", "dist/index.js"]
```
Adjust for the project's stack (Python, Go, etc.). Ask the user what their project uses if unclear.
## Step 3 — Create GitHub Actions workflow
Create `.github/workflows/deploy.yml`:
```yaml
name: Deploy to VPS
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy via SSH
u