When the directory where the built documentation should be place does not exist in the target branch, the action creates it as it should, but then tries to run git rm -r . which, in turn, triggers an error, failing the step in a workflow.
To reproduce the issue just pass a directory: name to the action where the retype branch does not initially have a name directory (nor file) in it.