ssh-deploy
ssh-deploy copied to clipboard
Script fails to run but action succeeds
I have some scripts that may fail to run, but the Action always succeeds whether it fails or not, I can't get the message that the Action's run failed
@furacas Are you providing the full path to the script you are wanting to run? Alternatively you could also cd to the directory within the SCRIPT_AFTER and then call the script.
@furacas Are you providing the full path to the script you are wanting to run? Alternatively you could also
cdto the directory within theSCRIPT_AFTERand then call the script.
sure, What I want to express is that the script fails to run, but the Github Action runs successfully. I expect that when the script fails to run, Github Action prompts failure
Currently main action task is rsync deployment. SSH scripts before/after are only logging results or error. I can add additional param / env var to control this behaviour. Default will still be just logging.
That would be really handy – we’re running migrations and reloading services in our post-deploy script, so any failures there are serious and we need to know about them. The individual action logs aren’t likely to be reviewed if they’re being logged as successful.
Thanks for the action, it’s a real timesaver.
Tacking on to this, we're seeing succesful taks even when rsync fails, logs below:
❌ [Rsync] error:
Error: rsync exited with code 23
at ChildProcess.<anonymous> (/home/runner/work/_actions/easingthemes/ssh-deploy/main/dist/index.js:2:2603)
at ChildProcess.emit (node:events:527:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) {
code: 23
}
❌ [Rsync] stderr:
rsync: [generator] recv_generator: mkdir "<dir-name>" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]
+1
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
+1
+1
Seems This project is supported this feature with this MR.
Just use easingthemes/ssh-deploy@main and pass SCRIPT_AFTER_REQUIRED = true variable to it.
Maybe we should mention it in the README.md
Readme updated: https://github.com/easingthemes/ssh-deploy/blob/main/README.md#12-script_after_required-optional-default-false
SCRIPT_AFTER_REQUIRED: true