Integrations

Deploy to VPS

The Sitequest-Software/sitequest-deploy-vps-action GitHub Action performs a Capistrano-style atomic release on your VPS — uploads a tarball, extracts it into a timestamped release directory, and swaps a current symlink. Optionally restarts a systemd unit.

What it does

  1. Tars source on the runner.
  2. Uploads it via the Sitequest REST API.
  3. On the VPS: extracts to <target-base>/releases/<run-id>/.
  4. Optionally chowns the release to owner.
  5. Atomically swaps <target-base>/current → the new release.
  6. Optionally restarts restart-service.
  7. Prunes old releases beyond keep-releases.

Inputs

Input Required Default Description
api-key Yes Sitequest API key with the vps:manage scope.
vps-id Yes Target VPS ID.
source No dist Local directory to deploy.
target-base Yes Absolute base path on the VPS. Releases go in <target-base>/releases/<run-id>/, symlink at <target-base>/current.
keep-releases No 5 Number of past releases to retain for rollback (set 0 to keep all).
restart-service No Optional systemd unit to restart after the symlink swap (e.g. myapp.service). Multiple units comma-separated.
owner No Optional user:group to chown the release to after extraction.
api-base No https://panel.site.quest Override the API base URL (for staging).

Outputs

Output Description
release-path Absolute path of the new release directory on the VPS.
bytes-uploaded Size of the uploaded tar.gz archive in bytes.
duration-ms End-to-end deploy duration in milliseconds.

Example workflow

name: Deploy to VPS

on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-node@v4
        with:
          node-version: 20

      - run: npm ci
      - run: npm run build

      - id: deploy
        uses: Sitequest-Software/sitequest-deploy-vps-action@v1
        with:
          api-key: ${{ secrets.SITEQUEST_API_KEY }}
          vps-id: ${{ vars.SITEQUEST_VPS_ID }}
          source: dist
          target-base: /var/www/myapp
          keep-releases: 5
          restart-service: myapp.service
          owner: www-data:www-data

      - run: echo "Deployed to ${{ steps.deploy.outputs.release-path }}"

Layout on the VPS

/var/www/myapp/
├── current → releases/9876543210/
└── releases/
    ├── 9876543210/   ← latest
    ├── 9876543200/
    └── 9876543190/

Point Nginx, your systemd unit, or your reverse proxy at <target-base>/current/. Rollback is a manual ln -sfn <previous> current away — or just re-run a previous workflow.

Required scope

The API key must have the vps:manage scope. Create one in the dashboard under API / MCP (in the profile menu).

See also