VS code deploy同步服务器代码

首先在安装“deploy”插件

然后打开settings.json文件加上

{
    "deploy": {
        "packages": [
            {
                "name": "Version 2.3.4",
                "files": [
                    "**/**",
                    "**/*.*",
                    "Makefile"
                ],
                "exclude": [
                    ".vscode/**",
                    "logs/**",
                    "data/**"
                ],
                "deployOnSave": true
            }
        ],
        "targets": [
            {
                "type": "sftp",
                "name": "nginx SFTP folder",
                "dir": "项目地址",
                "host": "服务器地址", "port": 22,
                "user": "用户名", "password": "密码"
            }
        ],
        "showPopupOnSuccess":false,
        "showDeployResultInStatusBar":true,
        "displayLoadedPlugins":false,
        "displayNetworkInfo":false
    }
}

 

posted @ 2019-04-02 10:10  张志健  阅读(1871)  评论(0编辑  收藏  举报