rsync fail with non-existent target folder
tlienart opened this issue · 2 comments
Hello,
This may well not be a bug but rather me forgetting to do something. Help welcome. What I'm trying to do is get PRs to a repo to be deployed to previews/PRXXX
on gh-pages
. To this effect I use github-pages-deploy-action
with something like
- uses: JamesIves/github-pages-deploy-action@releases/v4
with:
# ...
TARGET-FOLDER: previews/PR186
this failed with the following stacktrace:
Preparing worktree (detached HEAD 0d7b689)
/usr/bin/git checkout -B gh-pages origin/gh-pages
Previous HEAD position was 0d7b689 Merge ecb3d32e248e3ff0295e141decfb816cfd63c6e2 into e1a403ff4a81a9cc791dccdee388dd0f5ca829f8
Switched to a new branch 'gh-pages'
branch 'gh-pages' set up to track 'origin/gh-pages'.
/usr/bin/chmod -R +rw /home/runner/work/Xranklin.jl/Xranklin.jl/docs/__site
Creating target folder if it doesn't already exist… 📌
/usr/bin/rsync -q -av --checksum --progress /home/runner/work/Xranklin.jl/Xranklin.jl/docs/__site/. github-pages-deploy-action-temp-deployment-folder/previews/PR186 --delete --exclude CNAME --exclude .ssh --exclude .git --exclude .github
rsync: [Receiver] mkdir "/home/runner/work/Xranklin.jl/Xranklin.jl/github-pages-deploy-action-temp-deployment-folder/previews/PR186" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at main.c([787](https://github.com/tlienart/Xranklin.jl/actions/runs/3823067793/jobs/6503844184#step:4:796)) [Receiver=3.2.3]
Running post deployment cleanup jobs… 🗑️
/usr/bin/git checkout -B github-pages-deploy-action/0geob0s9i
Switched to a new branch 'github-pages-deploy-action/0geob0s9i'
/usr/bin/chmod -R +rw github-pages-deploy-action-temp-deployment-folder
/usr/bin/git worktree remove github-pages-deploy-action-temp-deployment-folder --force
Error: The deploy step encountered an error: The process '/usr/bin/rsync' failed with exit code 11 ❌
Notice: Deployment failed! ❌
When I got this error the gh-pages
branch did indeed not have a previews
folder, but I expected this not to be an issue (i.e. that it would do something like a mkdir -p target
on the deployment branch).
As far as I'm aware the syntax I've used is the same than that from here
do you know what I may have done wrong here? thanks!
Notes:
- full action here though I doubt the rest would be relevant: https://github.com/tlienart/Xranklin.jl/actions/runs/3823067793/jobs/6503844184
- using v4 of
github-pages-deploy-action
Edit:
as a small additional experiment; I force-created the previews
folder on gh-pages
and re-tried the action, and that worked (action) with output to https://github.com/tlienart/Xranklin.jl/tree/gh-pages/previews/PR187
so it would seem to suggest that there may be an issue with the target-folder
option that it should indeed call something like mkdir -p
on the target branch with the target folder, either that or there is an option to do this in your parameters which I overlooked.
I'm not sure what I got wrong but it looks like this was an issue on my side as the context in which I had the issue now works. And I can see in the code that theres the mkdirP
so on this side things should be ok.