/vuejs-cicd-deploy-ftp-cpanel

This project demonstrates how to set up a Vue 3 + Vite project using Bun or Node.js, with automated deployment to FTP CPanel VPS using GitHub Actions.

Primary LanguageTypeScriptMIT LicenseMIT

๐Ÿš€ Vue.js CI/CD Deployment on FTP CPanel (via GitHub Actions)

This project demonstrates how to set up a Vue 3 + Vite project using Bun or Node.js, with automated deployment to FTP CPanel VPS using GitHub Actions.


๐Ÿ“ฆ Tech Stack

  • โšก Vue 3
  • โš—๏ธ Vite
  • ๐Ÿงช Bun or Node.js
  • ๐Ÿ›  GitHub Actions CI/CD

๐Ÿงช Development

Run locally with Bun:

bun install
bun run dev

Or with npm:

npm install
npm run dev

โ–ถ GitHub Actions CI/CD

Automatic deployment is also set up via .github/workflows/deploy.yml. On every push to main, it:

  • Installs dependencies
  • Runs the build script (to generate dist directory)
  • Upload dist directory into target Host(server) via FTP/CPanel.

๐Ÿ“ Directory Structure

.
โ”œโ”€โ”€ .github/workflows/deploy.yml   # GitHub Actions CI/CD
โ”œโ”€โ”€ src/                           # Vue app source code
โ”œโ”€โ”€ dist/                          # Auto-generated after build
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ vite.config.ts
โ””โ”€โ”€ package.json

๐Ÿ›  Scripts in package.json

{
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  }
}

๐Ÿ” Notes

You need to add some GitHub Actions env variables.

  • FTP_HOST
  • FTP_PORT
  • FTP_USERNAME
  • FTP_PASSWORD
  • FTP_PATH

๐Ÿ‘ค Author

Seyyed Ali Mohammadiyeh (Max Base)

๐Ÿ“ฌ maxbasecode@gmail.com

๐Ÿ”— https://github.com/BaseMax

๐Ÿชช License

MIT