mirror of
https://github.com/Aviortheking/Blog_IMIE.git
synced 2025-04-22 19:02:10 +00:00
modif afin de mettre en place l'auto-uploder vers le serveur sftp
This commit is contained in:
parent
21306aba81
commit
032247785f
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
uploads/
|
||||||
|
node_modules/
|
||||||
|
package-lock.json
|
||||||
|
.vscode/
|
||||||
|
build/
|
19
gitlab-ci.yml
Normal file
19
gitlab-ci.yml
Normal 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
14
gulpfile.js
Normal 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
9
package.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user