35 lines
718 B
JavaScript
35 lines
718 B
JavaScript
const gulp = require('gulp')
|
|
const rsync = require('gulp-rsync')
|
|
const browser = require("browser-sync").create()
|
|
|
|
// paths
|
|
const DIST = './custom/'
|
|
|
|
|
|
//
|
|
// Dev Server
|
|
//
|
|
gulp.task('server', () => {
|
|
browser.init({
|
|
server: DIST,
|
|
port: 1337,
|
|
reloadDebounce: 2000
|
|
})
|
|
})
|
|
|
|
|
|
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
// Deployment
|
|
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
gulp.task('deploy', () => {
|
|
return gulp.src(DIST + '**/*')
|
|
.pipe(rsync({
|
|
root: DIST,
|
|
hostname: 'git',
|
|
username: 'ubuntu',
|
|
destination: '/home/git/gitea/custom',
|
|
chown: 'git:git'
|
|
}))
|
|
})
|