I have developed a Vue app and I am exploring ways to automate its deployment process by implementing a CI/CD pipeline that includes linting, testing, building, and uploading the files to web servers (such as stage or production using sftp).
After researching task runners like grunt (which appears outdated) and gulp, and considering options like Jenkins for CI, I am leaning towards using npm scripts. This would allow me to easily chain tasks like linting, testing, and building.
{
"scripts": {
"build": "vue-cli-service build --modern",
"lint": "vue-cli-service lint",
"prettier": "prettier --write src/**/*.{ts,js,vue,css,less,scss,html,json,md} public/**/*.{ts,js,vue,css,less,scss,html,json,md} test/**/*.{js,vue,css,less,scss,html,json,md} build/*.js",
"deploy": "# ...?",
"pipeline": "yarn lint && yarn prettier && yarn test && yarn build && yarn deploy"
},
However, I am still searching for the best approach to deploy the build to my web server. While grunt offers solutions like grunt-rsync and grunt-sftp-deploy, it may not be the most up-to-date option.
If anyone has recommendations or suggestions on an easier deployment method, please share!
Additional information: I am using Windows and prefer not to publish my source code on Github in this case.