如何构建 ZIP 文件并将其部署到 Azure Windows VM?

问题描述 投票:0回答:0

我正在尝试构建一个 ZIP 文件并将其部署到 Azure Windows VM。这是我的工作流程:

name: Test

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Set up Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 14

      - name: Npm
        run: |
            npm install -g @angular/[email protected]
            npm install
            ng build --prod

      - name: Upload artifact for deployment job
        uses: actions/upload-artifact@v3
        with:
            name: Test
            path: '${{ github.workspace }}/Test/dist'

      - name: Deploy new 
        uses: appleboy/ssh-action@master
        with:
           host: '20.xxx.xx.xx'
           username: 'azureuser'
           password: 'Nopassword@123456'
           script: |
              scp '${{ github.workspace }}/Test/dist C:\Server\Front\public\'

我得到这个错误:

+++++++++++++++++++STARTING PIPELINES+++++++++++++++++++
SSH-SCP-SSH no first_ssh input found
+++++++++++++++++++Pipeline: RUNNING SCP+++++++++++++++++++
Connect error
[Errno 110] Connection timed out
+++++++++++++++++++END PIPELINES+++++++++++++++++++

我该如何解决这个问题?或者是否有任何其他方法可以将 ZIP 文件部署到 Azure Windows VM?

github github-actions action
© www.soinside.com 2019 - 2024. All rights reserved.