修改发布小工具
This commit is contained in:
+25
-1
@@ -5,12 +5,36 @@ using System.Text;
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// SCP Settings
|
||||
string scpHost = "123.56.94.154";
|
||||
string scpUsername = "Administrator";
|
||||
string scpPassword = "WHxckj2019";
|
||||
|
||||
// SCP Connection
|
||||
using (var scpClient = new ScpClient(scpHost, scpUsername, scpPassword))
|
||||
{
|
||||
scpClient.Connect();
|
||||
|
||||
// Upload File using SCP
|
||||
using (var fs = new FileStream(@"D:\favicon.png", FileMode.Open))
|
||||
{
|
||||
//默认是C盘根目录
|
||||
scpClient.Upload(fs, @"/mytest/favicon.png");
|
||||
}
|
||||
|
||||
scpClient.Disconnect();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 创建一个SSH客户端实例
|
||||
using (var client = new SshClient("123.56.94.154", "Administrator", "WHxckj2019"))
|
||||
{
|
||||
// 连接到远程服务器
|
||||
client.Connect();
|
||||
//&& .\\IRaCIS_Vue_Web.bat
|
||||
|
||||
//&& ./IRaCIS_Vue_Web.bat
|
||||
string command = $@"cd C:\Users\Administrator\VueSourceCode && npm i && npm run build";
|
||||
|
||||
Reference in New Issue
Block a user