Loading…
Loading documentation...
Deploy application builds and run post-deploy health checks on an existing Linux server from GitHub Actions.
Automate testing, artifact transfer, and service restarts on an existing Servers Are Up Linux server whenever commits merge to main.
Create a Virtual Datacenter first. Enroll a machine in your cloud account or at your site, or choose a currently qualified external region in the VDC. Check the displayed provider, configuration and price before placing an order.
~/.ssh/authorized_keys (or registered under Access > SSH keys).DEPLOY_HOST — your environment's public IPv4 addressDEPLOY_PORT — the public TCP port forwarded to your server's port 22DEPLOY_USER — non-root deploy user (for example, deploy)DEPLOY_SSH_KEY — private Ed25519 key for DEPLOY_USERDEPLOY_KNOWN_HOSTS — pinned ssh-keyscan -p PORT HOST line so CI verifies the host fingerprint.github/workflows/deploy.yml)name: Build and Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install and test
run: |
npm ci
npm test
- name: Deploy over pinned OpenSSH
env:
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
DEPLOY_PORT: ${{ secrets.DEPLOY_PORT }}
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
DEPLOY_KNOWN_HOSTS: ${{ secrets.DEPLOY_KNOWN_HOSTS }}
run: |
install -m 700 -d ~/.ssh
printf '%s
' "$DEPLOY_SSH_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
printf '%s
' "$DEPLOY_KNOWN_HOSTS" > ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
rsync -az --delete --exclude node_modules --exclude .git ./ \
-e "ssh -p $DEPLOY_PORT -i ~/.ssh/id_ed25519" \
"$DEPLOY_USER@$DEPLOY_HOST:/srv/app/"
ssh -p "$DEPLOY_PORT" -i ~/.ssh/id_ed25519 "$DEPLOY_USER@$DEPLOY_HOST" \
"cd /srv/app && npm ci --omit=dev && sudo systemctl restart app && curl -fsS http://127.0.0.1:3000/health"
If you keep inbound SSH turned off on the public edge, create a Personal Access Token under Account settings > API keys (/account/api-keys) with instances:read and instances:exec scopes and invoke POST /api/v1/instances/{id}/exec over HTTPS from your workflow.
Open the workspace to check your machine’s connection and available controls. For automation, consult the REST API or MCP guide. Include the resource and region when you contact support.