scp-action
scp-action copied to clipboard
Published path problem.
The directory uploaded to the server becomes /var/www/test/github/workspace/Release not /var/www/test
name: Upload theme to play-with-ghost.com | via SSH
uses: appleboy/[email protected]
with:
host: "${{ secrets.NODE1 }}"
port: ${{ secrets.SSH_PORT }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.PASSWORD }}
source: "/home/runner/work/InnoImg/InnoImg/Release/*"
target: "/var/www/test"
Same problem here! Did you found a fix?
Same problem here! Did you found a fix?
Not yet. We have to cooperate with the upload and then execute the Linux command.
Had same problem. You need to use strip_components parameter as specified on #59
source: "/home/runner/work/InnoImg/InnoImg/Release/"
target: "/var/www/test"
strip_components: 6
@bbhxwl I had the same issue as you. I believe we can close this.
same problem.The folder path of the server is /home/solution-box/server/go/src/server/go/src/app,but is expected to be /home/solution-box/server/go/src/app,strip_components parameter not work
- name: 向服务器传输go二进制可执行程序
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.HUAWEI_USERNAME }}
port: ${{ secrets.SSH_PORT }}
password: ${{ secrets.HUAWEI_PASSWORD }}
source: "./server/go/src/app"
target: "/home/solution-box/server/go/src/"
overwrite: true
strip_components: 3
Thanks All, just use strip_components
parameter to fix the path issue.
Just leaving this here for reference:
If you have a case where a dist is being generated and you want to export the contents (like I did for a next
export), do the following
- name: Copy static files
uses: appleboy/[email protected]
with:
host: ${{ secrets.AWS_HOST }}
username: ${{ secrets.AWS_USERNAME }}
key: ${{ secrets.AWS_SECRET_KEY }}
source: './dist/apps/website/exported/'
target: ${{ secrets.HOST_VOLUME_PATH }}
strip_components: 5
strip_components
is 5 since the ./
is counted as well. All files in the exported
folder were copied successfully
@catnuko This might work for you