我已经使用在 Windows 代理上运行的 GitHub 操作管道构建了我的项目。生成工件并将其存储在存储库中。我的下一个任务是将其发送到 Azure Windows VM。我真的不知道该怎么做。
name: Deploy to Azure Windows VM
on:
push:
branches:
- do/cs
jobs:
deploy:
runs-on: windows-2019
steps:
- name: Checkout code
uses: actions/checkout@v3
并继续这个管道来构建我的 C# 项目。现在工件已下载到存储库中,我希望将其发送到 Azure Windows VM。这是我正在使用的动作:
- name: Copy artifacts to azure VM
uses: azure/scp-action@v2
with:
host: 'VM-public-ip'
username: 'azureuser'
password: 'pwsd'
source: ./test.zip
target: 'C:\\Users\a\zureuser\\'
哪里
test.zip
是下载到repo中的工件。
请继续此管道并将我的工件部署到 Windows VM。假设我们有名为
test.zip
的工件。我已经构建了我的项目,但无法部署到 Azure Windows VM。