简体   繁体   English

推送 GITHUB 神器到服务器

[英]Push GITHUB artifact to server

I need some help.我需要协助。 I have a .net4 website and in GITHUB actions i can do the build and create artifacts.我有一个 .net4 网站,在 GITHUB 操作中,我可以进行构建和创建工件。 I now want to use an action to push that artifact to a folder on my remote server.我现在想使用一个操作将该工件推送到远程服务器上的一个文件夹中。 How on earth can i do that and trigger it from the GITHUB workflow after the artifact is built?在构建工件后,我到底该怎么做并从 GITHUB 工作流程触发它? Been googling this for hours and I'm just not finding it.谷歌搜索了几个小时,我就是找不到。 Any help would be awesome.任何帮助都是极好的。

You can use the Copy via ssh GH Action.您可以通过 ssh GH 操作使用复制 This action allows uploading files or directories to the remote server using SSH commection:此操作允许使用 SSH commection 将文件或目录上传到远程服务器:

- name: Copy single file to remote
  uses: garygrossgarten/github-action-scp@release
  with:
    local: your-artifact
    remote: remote-path/your-artifact
    host: ${{ secrets.HOST }}
    username: ${{ secrets.SSH_USER }}
    password: ${{ secrets.PASSWORD }}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM