dasuchin / grunt-ssh-deploy

Grunt SSH Deployment
MIT License
66 stars 45 forks source link

options.exclude not working #60

Open justusdeitert opened 7 years ago

justusdeitert commented 7 years ago

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 commented 7 years ago

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

amitgur commented 7 years ago

+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 ?