module.exports = function (grunt) {
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        app: {
            baseurl: 'glynn-admin',
            app: '_site'
        },
        clean: {
            bootstrap: ['_sass/bootstrap']
        },
        watch: {
            jekyll: {
                files: [
                    'site/**/*.{html,yml,md,mkd,markdown,js,css}'
                ],
                tasks: ['jekyll:server']
            },
            livereload: {
                options: {
                    livereload: '<%= connect.options.livereload %>'
                },
                files: [
                    '_site/**/*.{html,yml,md,mkd,markdown}',
                    '<%= app.app %>/img/**/*.{gif,jpg,jpeg,png,svg,webp}'
                ]
            },
            sass: {
                files: [
                    'scss/**/*.scss'
                ],
                tasks: ['sass', 'copy:dist']
            },
            js: {
                files: [
                    'js/**/*.js'
                ],
                tasks: ['browserify', 'copy:dist']
            }
        },
        connect: {
            options: {
                port: 9000,
                livereload: 35729,
                // change this to '0.0.0.0' to access the server from outside
                hostname: '0.0.0.0',
                path: '<%= app.baseurl %>'
            },
            livereload: {
                options: {
                    open: {
                        target: 'http://0.0.0.0:9000/<%= app.baseurl %>'
                    },
                    base: [
                        '<%= app.app %>'
                    ]
                }
            },
            dist: {
                options: {
                    open: {
                        target: 'http://0.0.0.0:9000/<%= app.baseurl %>'
                    },
                    base: [
                        '<%= app.app %>'
                    ]
                }
            }
        },
        jekyll: {
            options: {
                bundleExec: true,
                config: '_config_dev.yml',
                incremental: false
            },
            docs: {},
            github: {
                options: {
                    raw: 'github: true'
                }
            },
            server: {
                options: {
                    config: '_config_dev.yml',
                }
            }
        },
        sass: {
            dist: {
                options: {
                    style: 'expanded',
                    // tell Sass to look in the Bootstrap stylesheets directory when compiling
                    loadPath: 'node_modules'
                },
                files: {
                    // the first path is the output and the second is the input
                    'dist/css/glynn-admin.css': 'scss/glynn-admin.scss'
                }
            }
        },
        browserify: {
            dist: {
                files: {
                    'dist/js/glynn-admin.js': ['js/index.js']
                }
            }
        },
        copy: {
            options: {},
            fontawesome: {
                expand: true,
                cwd: 'node_modules/font-awesome/fonts',
                src: '**',
                dest: 'site/fonts'
            },
            javascript: {
                expand: true,
                flatten: true,
                src: ['node_modules/jquery/dist/jquery.min.js', 'node_modules/jquery/dist/jquery.min.map', 'node_modules/tether/dist/js/tether.min.js', 'node_modules/bootstrap/dist/js/bootstrap.min.js', 'node_modules/moment/min/moment-with-locales.js', 'node_modules/chart.js/dist/Chart.min.js'],
                dest: 'site/scripts/'
            },
            dist: {
                expand: true,
                cwd: 'dist/',
                src: [
                    '**/*'
                ],
                dest: 'site/'
            }
        }
    });

    grunt.loadNpmTasks('grunt-contrib-copy');
    grunt.loadNpmTasks('grunt-contrib-clean');
    grunt.loadNpmTasks('grunt-contrib-connect');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-jekyll');
    grunt.loadNpmTasks('grunt-contrib-sass');
    grunt.loadNpmTasks('grunt-browserify');

    grunt.registerTask('build', ['copy']);
    grunt.registerTask('serve', [
        'sass',
        'browserify',
        'copy',
        'jekyll:server',
        'connect:livereload',
        'watch'
    ]);
};
@@ -3971,32 +3971,479 @@
 '%0A            %7D%0A
+        %7D,%0A        buildcontrol: %7B%0A            options: %7B%0A                dir: '_site',%0A                commit: true,%0A                push: true,%0A                message: 'Built %25sourceName%25 from commit %25sourceCommit%25 on branch %25sourceBranch%25'%0A            %7D,%0A            pages: %7B%0A                options: %7B%0A                    remote: 'git@github.com:disjfa/glynn-admin.git',%0A                    branch: 'gh-pages'%0A                %7D%0A            %7D%0A
         %7D%0A    %7D)
@@ -4432,24 +4432,24 @@
 %7D%0A        %7D%0A
-
     %7D);%0A%0A   
@@ -4763,16 +4763,63 @@
 erify');
+%0A    grunt.loadNpmTasks('grunt-build-control');
 %0A%0A    gr
@@ -5018,14 +5018,14 @@
 ch'%0A
-
     %5D);%0A
 %7D;
@@ -5022,10 +5022,66 @@
     %5D);%0A
+    grunt.registerTask('push', %5B'buildcontrol:pages'%5D);%0A
 %7D;

test push gh-pages