better deploy

This commit is contained in:
2016-10-13 20:56:43 -05:00
parent fa8fc26b8a
commit 3b0d26bff1
4 changed files with 34 additions and 10 deletions

2
.gitignore vendored
View File

@ -52,3 +52,5 @@ results
*bower_components *bower_components
node_modules node_modules
dist dist
.ftppass
sftpCache.json

View File

@ -69,7 +69,36 @@ module.exports = function(grunt) {
hostname: '*', hostname: '*',
} }
} }
},
copy: {
dist: {
expand: true,
cwd: '.',
src: [
'bower_components/normalize-css/normalize.css',
'font/**/*',
'img/**/*',
'*.{html,css}'
],
dest: 'dist/'
}
},
'sftp-deploy': {
build: {
auth: {
host: 'markamoser.com',
port: 6791,
authKey: 'workhorse'
},
cache: 'sftpCache.json',
src: 'dist/',
dest: 'www/links/',
progress: true
}
} }
}); });
// Tasks // Tasks
@ -83,4 +112,5 @@ module.exports = function(grunt) {
}); });
grunt.registerTask('default', ['serve']); grunt.registerTask('default', ['serve']);
grunt.registerTask('deploy', ['copy:dist', 'sftp-deploy:build']);
}; };

View File

@ -1,10 +0,0 @@
#!/bin/bash
DEST=/var/www/links/
mkdir -p $DEST/bower_components/normalize-css
cp bower_components/normalize-css/normalize.css $DEST/bower_components/normalize-css/normalize.css
cp -r ./font $DEST
cp -r ./img $DEST
cp ./*.html $DEST
cp ./*css $DEST

View File

@ -6,9 +6,11 @@
"devDependencies": { "devDependencies": {
"grunt": "~0.4.5", "grunt": "~0.4.5",
"grunt-contrib-connect": "^0.11.2", "grunt-contrib-connect": "^0.11.2",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-csslint": "~0.5.0", "grunt-contrib-csslint": "~0.5.0",
"grunt-contrib-jshint": "~0.11.3", "grunt-contrib-jshint": "~0.11.3",
"grunt-contrib-watch": "0.6.1", "grunt-contrib-watch": "0.6.1",
"grunt-sftp-deploy": "^0.2.5",
"jshint-stylish": "~2.1.0", "jshint-stylish": "~2.1.0",
"load-grunt-tasks": "~3.3.0" "load-grunt-tasks": "~3.3.0"
}, },