{
  "id": 9363961,
  "title": "How I Automated My Laravel Deployments to a VPS with GitHub Actions and SSH",
  "url": "https://urgent.news/2026/09/23/how-i-automated-my-laravel-deployments-to-a-vps-with-github-actions",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-23T15:17:26.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/youssefahmedcs/simple-continuous-deployment-for-laravel-with-github-actions-and-a-vps-58ok"
  },
  "original_language": "en",
  "account": "Automating Laravel deployments on a VPS can be simplified using GitHub Actions and SSH key authentication. This guide outlines the process of setting up a lightweight Continuous Deployment pipeline for Laravel applications on a Linux VPS (Ubuntu) hosted on GitHub. The core flow involves pushing code changes that trigger GitHub Actions to connect to the VPS via SSH and execute deployment commands.\n\nThe process begins by ensuring the local project is linked to the GitHub repository and verifying the server folder structure. Next, Git's ownership issue is addressed to allow safe execution of Git commands. GitHub secrets are then configured to securely store SSH authentication details. A GitHub Actions workflow file (.github/workflows/deploy.yml) is created to define the deployment steps.\n\nThe deployment workflow includes steps such as setting up the SSH connection, putting the application into maintenance mode, pulling the latest changes from the main branch, installing production dependencies, running database migrations, clearing caches, and finally bringing the app back online. The deployment commands are executed over SSH, ensuring a secure and automated deployment process.\n\nBy following these steps, developers can achieve an efficient and error-resistant deployment process for their Laravel applications hosted on a VPS, enhancing productivity while minimizing the risk of manual errors.",
  "summary": "Running a Laravel application on a VPS usually means repeating the same routine: connecting via SSH, pulling latest changes, running composer updates, migrating the database, and clearing caches manually. It works, but it's repetitive and prone to human error. So I automated the boring part. In this guide, I'll walk through setting up a lightweight Continuous Deployment (CD) pipeline using:…",
  "key_points": [],
  "editors_take": null,
  "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."
}