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.
Run locally with Bun:
bun install
bun run dev
Or with npm:
npm install
npm run dev
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.
.
โโโ .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": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
}
}
You need to add some GitHub Actions env variables.
FTP_HOST
FTP_PORT
FTP_USERNAME
FTP_PASSWORD
FTP_PATH
Seyyed Ali Mohammadiyeh (Max Base)
๐ https://github.com/BaseMax
MIT