git.berlin/gulpfile.js

35 lines
718 B
JavaScript
Raw Normal View History

2018-12-07 15:13:40 +01:00
const gulp = require('gulp')
const rsync = require('gulp-rsync')
const browser = require("browser-sync").create()
2016-04-30 18:20:09 +02:00
// paths
2018-12-07 15:13:40 +01:00
const DIST = './custom/'
2016-10-16 00:41:56 +02:00
//
// Dev Server
//
2018-12-07 15:13:40 +01:00
gulp.task('server', () => {
2016-10-16 00:41:56 +02:00
browser.init({
server: DIST,
port: 1337,
reloadDebounce: 2000
})
})
2016-04-30 18:20:09 +02:00
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// Deployment
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-12-07 15:13:40 +01:00
gulp.task('deploy', () => {
2016-04-30 18:20:09 +02:00
return gulp.src(DIST + '**/*')
2018-12-07 15:13:40 +01:00
.pipe(rsync({
root: DIST,
hostname: 'git',
username: 'ubuntu',
destination: '/home/git/gitea/custom',
chown: 'git:git'
2016-10-16 00:41:56 +02:00
}))
})