πŸš€ Building & Deploying My First Laravel Filament Project on Cloudways with Git Integration

Recently, I completed a small Laravel project using Filament Admin Panel, and deployed it on a Cloudways server using Git.

The project imports customer data from a CSV file and is still in early development, so I kept things simple, manual, and transparent. In this post, I’ll walk you through my process – from development to deployment – along with the tech stack and commands I used.

🧰 Tech Stack & Tools

  • Laravel (v12)
  • Filament PHP (Admin Panel)
  • Composer
  • Git + GitHub (Private Repo)
  • Cloudways (PHP App on a managed server)
  • Cloudways SSH Console
  • CSV file import functionality

πŸ”¨ Step 1: Building the Project Locally

I started on my local machine and created a Laravel project using Composer. Then I installed Filament to build the admin interface:

composer create-project laravel/laravel filament-demo
cd filament-demo
composer require filament/filament
php artisan make:filament-user

βœ… Added CSV Import Feature

I built a simple module to upload and import customer data from a CSV file. It validated and seeded the data into the customers table.


πŸ” Step 2: Connect Project to GitHub

Once the basic functionality was working locally, I initialized a Git repo and pushed the code to a private GitHub repository:

git init
git remote add origin git@github.com:your-username/filament-demo.git
git add .
git commit -m "Initial commit"
git push -u origin main

☁️ Step 3: Set Up a Cloudways PHP App

In Cloudways:

  • I created a new PHP App (not Laravel app) on a DigitalOcean server.
  • Used β€œDeploy via Git” under the Application Management section.
  • Cloudways generated a public SSH key, which I added to my GitHub repo’s Deploy Keys.

πŸ›  Configure Git Deployment

  • Repository URL: git@github.com:your-username/filament-demo.git
  • Branch: main
  • Deployment Path: Set it to /public_html (or a subfolder like /public_html/filament)

Once configured, I triggered the deployment manually from the Cloudways dashboard.


πŸ§‘β€πŸ’» Step 4: SSH into the Server and Set Up Laravel

Using the Cloudways in-browser SSH Terminal, I navigated to the app directory and ran the following Laravel setup commands:

cd applications/<your-app-name>/public_html

# Set Laravel key
php artisan key:generate

# Install dependencies
composer install

# Run migrations
php artisan migrate

# Seed the database
php artisan db:seed

Note: Since this is a PHP app (not a Laravel one), I had to make sure the public/ folder contents were accessible by the web server. In some cases, symlinking public/ to public_html/ may be required.


πŸ”„ Step 5: Manual Git Pull Workflow (for Now)

Because my project is in the early development phase, I intentionally chose manual pull from the Git repo. My workflow looks like this:

  1. Develop locally
  2. git commit and git push to GitHub
  3. Manually pull from Cloudways dashboard

Later, I plan to automate deployments using GitHub webhooks that trigger Cloudways’ deployment automatically on every push.


βœ… Deployment Checklist

Here’s a summary of commands/configs I ran on the server after each deployment:

# Navigate to app directory
cd applications/<your-app-name>/public_html

# Pull latest changes (if needed)
git pull origin main

# Update dependencies
composer update

# Run Laravel commands
php artisan migrate --force
php artisan db:seed --force
php artisan config:cache

πŸ’‘ Final Thoughts

This was a great learning experience – integrating GitHub with Cloudways, manually managing deployments, and using Filament to quickly build an admin panel.

If you’re just getting started with Laravel or deploying without CI/CD, this kind of setup is easy to maintain and helps you learn the internals before automating everything.


πŸ”œ What’s Next?

  • Add GitHub Webhooks for auto-deployment
  • Explore queues and jobs for background processing
  • Enhance the CSV importer with more validations and logs