{
  "id": 6668058,
  "title": "Automatically Deploy Your App to a VPS with GitHub Actions",
  "url": "https://urgent.news/2026/09/11/automatically-deploy-your-app-to-a-vps-with-github-actions",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-11T00:04:23.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/urvin/automatically-deploy-your-app-to-a-vps-with-github-actions-4k5o"
  },
  "original_language": "en",
  "account": "GitHub Actions automates the process of deploying your application to a Virtual Private Server (VPS) with a simple GitHub push. This eliminates the need for manual SSH connections, command executions, and restarts. To set this up, you'll need an app in a GitHub repository, a VPS you can SSH into, a dedicated Linux user for deploys, and a few prerequisites.\n\nFirst, generate an SSH key exclusively for deployment on your local machine. Add the public key to your server and test the connection. Then, grant the deploy user permission to restart your application without requiring a password. Store the SSH private key as a secret in your GitHub repository.\n\nCreate a GitHub Actions workflow file, `.github/workflows/deploy.yml`, that runs automatically on every push to the main branch. The workflow uses the `appleboy/ssh-action` to connect to your VPS, fetches the latest code from the main branch, resets to that commit, installs dependencies, builds the application, applies migrations, and finally restarts the app. Common issues include permission errors, SSH username problems, missing dependencies, and memory constraints during build. Ensure your server setup matches the workflow's assumptions and adjust accordingly.",
  "summary": "If your deploy process is \"SSH into the server, cd to the app, git pull , restart something, hope\" — this post replaces it with git push . What you'll have by the end: every push to your main branch updates the app on your server automatically. You can also trigger a deploy by hand from the GitHub UI. This is the simple version — it has a few seconds of downtime during the restart and it builds…",
  "key_points": [
    "GitHub Actions automates VPS deployment via GitHub push",
    "Requires app in GitHub repo, SSH-accessible VPS, dedicated deploy user",
    "Store private SSH key as GitHub repository secret"
  ],
  "editors_take": "This automation streamlines app deployment by removing manual steps, allowing developers to focus on coding rather than server management tasks.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}