grunt-ssh-deploy icon indicating copy to clipboard operation
grunt-ssh-deploy copied to clipboard

options.exclude not working

Open justusdeitert opened this issue 8 years ago • 2 comments

Hi I'am setting up grunt-ssh-deploy at the moment, however I can't figure out why my excluded folders and files still getting uploaded. Here are my Grunt settings:

environments: {
    options: {
        local_path: './',
        current_symlink: 'current',
        deploy_path: '/apps'
    },
    production: {
        options: {
            host: '<%= secret.production.host %>',
            username: '<%= secret.production.username %>',
            password: '<%= secret.production.password %>',
            port: '<%= secret.production.port %>',
            releases_to_keep: '3',
            release_subdir: 'zahnarzt',
            exclude: [
                // Exclude Folders
                'bower_components',
                'node_modules',
                'public/css',
                'public/icons',
                'public/js',
                // Files
                '.git',
                '.gitignore',
                '.idea',
                '.sass-cache',
                // Secrets
                'secret.json'
            ]
        }
    }
}

justusdeitert avatar Feb 15 '17 12:02 justusdeitert

option.exclude only works if you have option.zip_deploy set to true

justusdeitert avatar Feb 15 '17 17:02 justusdeitert

+1 That exclude works only with zip

But I wonder, how do you deal with node_modules ? it should be in the "current" symlink if you want nodejs to use 'require' properly. How does your server app get access to node_modules without installing them every deploy ?

amitgur avatar Mar 06 '17 14:03 amitgur