An open API service indexing awesome lists of open source software.

https://github.com/basemax/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.
https://github.com/basemax/vuejs-cicd-deploy-ftp-cpanel

cd ci ci-cd cicd cpanel ftp github github-action github-actions vue-cicd vuejs vuejs-cicd

Last synced: 4 months ago
JSON representation

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.

Awesome Lists containing this project

README

          

# ๐Ÿš€ 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](https://vuejs.org/)
- โš—๏ธ [Vite](https://vitejs.dev/)
- ๐Ÿงช [Bun](https://bun.sh/) or [Node.js](https://nodejs.org/)
- ๐Ÿ›  GitHub Actions CI/CD

---

## ๐Ÿงช Development

Run locally with **Bun**:

```bash
bun install
bun run dev
```

Or with npm:

```bash
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

```bash
.
โ”œโ”€โ”€ .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

```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