This guide contains the necessary steps to automatically deploy your Vue.js frontend and .NET backend applications to your servers via FTP.
cd src/frontend
npm install # This will create package-lock.json automatically# Install lftp (for FTP deployment)
brew install lftp
# Install fswatch (for file watching)
brew install fswatchcp src/frontend/.env.deploy.example src/frontend/.env.deploy
# Edit the file and enter your FTP credentialscp src/backend/.env.deploy.example src/backend/.env.deploy
# Edit the file and enter your API FTP credentialscd src/frontend
npm run deploycd src/backend
./scripts/deploy.shTo watch and automatically deploy both applications with a single command:
./watch-deploy.shThis command:
- Watches frontend changes (
src/frontend/src) - Watches backend changes (
src/backend) - Automatically builds and deploys when changes are detected
For automatic deployment when pushing to GitHub repository:
- Go to GitHub repository settings > Secrets and variables > Actions
- Add the following secrets:
FTP_HOST: evren.devFTP_USERNAME: Your FTP usernameFTP_PASSWORD: Your FTP password
FTP_HOST_API: api.evren.devFTP_USERNAME_API: Your API FTP usernameFTP_PASSWORD_API: Your API FTP password
Available scripts in the frontend folder:
npm run deploy: Build + FTP uploadnpm run watch-deploy: Watch file changes and auto deploynpm run build: Build onlynpm run upload: FTP upload only
evren.dev/
βββ .github/workflows/deploy.yml # GitHub Actions workflow
βββ watch-deploy.sh # Auto-watch script
βββ src/
β βββ frontend/
β β βββ .env.deploy # FTP settings (in gitignore)
β β βββ .env.deploy.example # FTP settings template
β β βββ scripts/deploy.js # Frontend deployment script
β βββ backend/
β βββ .env.deploy # API FTP settings (in gitignore)
β βββ .env.deploy.example # API FTP settings template
β βββ scripts/deploy.sh # Backend deployment script
.env.deployfiles should be added to.gitignore- Never commit FTP passwords to the repository
- Use secrets for GitHub Actions
-
Grant execution permissions to script files on first setup:
chmod +x watch-deploy.sh chmod +x src/backend/scripts/deploy.sh
-
lftpis required for backend deployment -
fswatchis required for file watching -
If using Windows, WSL or PowerShell scripts may be needed