No longer uploading files
Since the latest change, uploading files doesnt seem to work. It deletes them fine but doesnt upload.
name: build site
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build_site:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install
- name: Use cache
uses: actions/cache@v4
with:
# See here for caching with `yarn` https://github.com/actions/cache/blob/main/examples.md#node---yarn or you can leverage caching with actions/setup-node https://github.com/actions/setup-node
path: |
~/.npm
${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: build site
run: npm run build
- name: Copy folder content recursively to remote
uses: garygrossgarten/github-action-scp@release
with:
local: out
remote: site
host: ${{ secrets.SSH_HOST }}
port: ${{ secrets.SSH_PORT }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.SSH_PASSWORD }}
concurrency: 5
rmRemote: true
I have a similar problem: I am using version 0.6.0 in a project. Some files are uploaded, then it takes a long time until the connection times out. The last time it worked was four months ago. Maybe it's due to a change on GitHub? Because I am not using the latest version.
For reference it seems the files are uploaded as temporary files now and never copied fully
https://github.com/garygrossgarten/github-action-scp/issues/50#issuecomment-2222883601
Just confirming that running it on windows-latest works so its something with linux
Experiencing the same issue, running ubuntu-latest so I will try changing it to windows-latest instead.
However it's random, for example around two hours ago I ran this action and everything completed in 5 minutes (normal time), I then ran it again around one hour ago where first it timed out and failed, on the second try it did finish but after around 20 minutes.
Just leaving this here in case it helps in any way to identify the issue.
get the same issue, run on ubuntu-latest, becase new openssh fix ?
I use other other scp github action to solved.
https://github.com/kaiyuanshe/OSS-toolbox/pull/16
Me too
I used https://github.com/appleboy/scp-action instead, which solved the problem and is more efficient
Same here. What is the FIX?
Doesn't work randomly, ruined my production :( Copies only ~20 files of React app then silently quits. I tried all versions, from 0.5.3 to 0.9
The only stable "fix" for this is to (sadly) migrate to another action, like this one https://github.com/appleboy/scp-action
I've done it for all workflows now and everything working great again.
Same error I am getting, when I try other scp github action it worked but copy my war file as directory
Same error I am getting, when I try other scp github action it worked but copy my war file as directory我遇到同样的错误,当我尝试其他 scp github 操作时,它起作用了,但将我的 war 文件复制为目录
- name: Transport Image
uses: appleboy/[email protected]
with:
source: ./build/*.*
target: /tmp/${{ env.BOX_NAME }}
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
password: ${{ secrets.PASSWORD }}
strip_components: 1
you need set strip_components , and set source: ./build/*.*
-
name: Deploying war file to demo if: steps.branch-name.outputs.current_branch == 'dev' uses: appleboy/[email protected] with: host: caritas.fiter.io username: ubuntu key: ${{ secrets.DEMO_SERVER_SSH_KEY }} port: 22 source: "/fineract-provider/build/libs/fineract-provider.war" target: "/opt/tomcat/webapps/fineract-provider.war"
This is mine what exact fix their should be
Thanks It worked
My configuration for static React via nginx: - name: Deploy uses: appleboy/[email protected] with: host: ${{ secrets.SSH_HOST }} username: ${{ secrets.SSH_USER }} key: ${{ secrets.SSH_KEY }} source: "build" target: "/var/www/tales-staging" strip_components: 1
Same for me.
An other action you can use is ssh-scp-ssh-pipelines
In one single action you can chain ssh, scp and an other ssh commands. It's interesting to publish rpms for example : create a directory with the first ssh, transfer rpms in this directory by scp and run createrepo with the last ssh.
any fix for this?
Any updates on this?