modif afin de mettre en place l'auto-uploder vers le serveur sftp

This commit is contained in:
Florian Bouillon 2018-10-30 00:11:16 +01:00
parent 21306aba81
commit 032247785f
9 changed files with 47 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
uploads/
node_modules/
package-lock.json
.vscode/
build/

19
gitlab-ci.yml Normal file
View File

@ -0,0 +1,19 @@
image: node:latest
cache:
paths:
- node_modules/
before_script:
- npm install -g gulp
- npm install
stages:
- build_deploy
build_&_deploy_app:
stage: build_deploy
only:
- master
script:
- gulp deploy

14
gulpfile.js Normal file
View File

@ -0,0 +1,14 @@
var gulp = require('gulp');
var sftp = require('gulp-sftp');
var args = require("yargs").argv;
gulp.task('deploy', function() {
if(args.password == undefined) return
return gulp.src('project/**/*')
.pipe(sftp({
host: 'ftp.cluster020.hosting.ovh.net',
user: 'deltawinbo',
pass: args.password,
remotePath: '/home/deltawinbo/blog'
}));
});

9
package.json Normal file
View File

@ -0,0 +1,9 @@
{
"name": "delta-dashboard",
"version": "0.1.0",
"devDependencies": {
"gulp": "^3.9.1",
"gulp-sftp": "^0.1.5",
"yargs": "^12.0.2"
}
}