-
-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't overwrite files on the branch with the action #390
Comments
Now, this use case is not supported. |
Actually, there is a simple workaround. The failure is due to the GitHub's Action toolkit's unexpected behaviour with copying stuff. The workaround is to forcefully remove the file at It won't achieve the desired behaviour fully, since the subdirectory of deployment will still contain old files that weren't overwritten, but for most use cases this is going to be just fine, because the build should complete successfully. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The v3.7.0-4 has been released as a beta release. - name: Deploy
uses: peaceiris/actions-gh-pages@v3.7.0-4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
destination_dir: subdir |
If you have something wrong, please feel free to open another issue. 👍 |
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 totrue
while copying, it still fails withEEXIST: 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
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
The text was updated successfully, but these errors were encountered: