`doc-deploy-dev` action is not removing content created by `doc-deploy-pr` if `gh-pages` branch is not orphan
- Dominant language
- Python
- Stars
- 19
- Forks
- 7
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 70
Description
I believe that the `doc-deploy-dev` action is failing to remove the content created by the `doc-deploy-pr` action (subfolder in the `/pull` directory on the `gh-pages` branch, removed if the corresponding PR is closed) if the `gh-pages` branch is not orphan.
Here is a PR where I noticed it: https://github.com/ansys/pyaedt/pull/7983.
We had for some time set the `gh-pages` branch to not be orphan in PyAEDT and everyday, when a workflow executing the `doc-deploy-dev` action was run, a new comment was added to that closed PR: The action does notice that a subfolder on the `gh-pages` branch has to be removed, but fails at deleting it, so it's again finding it one the next day and posting that same comment again, etc !
For reference, here is a run where this happens: https://github.com/ansys/pyaedt/actions/runs/33831780194/job/100900831479
Note that the run is still returning success despite this.
My understanding is that the step named "Clean up pull/ directory if it exists" works just fine (hence the comments), but then there is something in the implementation of the `peaceiris/actions-gh-pages` that interferes with the deletion if the `gh-pages` branch has history. Somehow the change of deleting the folder is not pushed to the remote maybe?
Sorry that I cannot point to the exact root cause of this.
I can also confidently say that adding / removing the "deploy-pr-doc" badge (triggering the `doc-deploy-pr` action in PyAEDT) won't affect that behavior.
I understand this is a pretty corner case as `gh-pages` branches will most of the time be orphan (that branch is back to orphan in PyAEDT now), but still wanted to share that observation.
Contributor guide
Research direction
Begin with the doc-deploy-dev workflow and its "Clean up pull/ directory if it exists" step, then compare how doc-deploy-pr creates the subfolder and how peaceiris/actions-gh-pages publishes changes on a non-orphan gh-pages branch. Reproduce the behavior using the linked PyAEDT run and PR as references; done means closed PR subfolders are deleted remotely and the repeated comment no longer appears.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100