-
-
Notifications
You must be signed in to change notification settings - Fork 425
Description
Describe the bug
My CI is set up to deploy pull requests to separate folders to allow previewing changes. I've run into an issue while trying to push subsequent commits onto a pull request branch that has already been deployed.
On the Prepare publishing assets step (this line of code) it is trying to copy the assets over the previously existing ones, and even though force
is set to true
while copying, it still fails with EEXIST: file already exists
.
This failure is (probably mistakenly) treated as a failure to check out a branch, which causes the action to try and create a new branch, which doesn't work because the branch, in fact, exists.
To Reproduce
- Set up deploying on pull requests (workflow file here)
- Create a pull request and let it deploy
- Push more commits to the same branch
Expected behavior
The action should empty out the directory that stores files for this PR, then freshly copy over the new assets
Your YAML file
https://github.com/illright/attractions/blob/develop/.github/workflows/pr_demo.yml
Additional context
Here's the link to the failed job logs:
https://github.com/illright/attractions/runs/857251843?check_suite_focus=true