GitHub actionでmkdocs
のドキュメントを作るたびにこのエラー↓にはまるのでメモ。
subprocess.CalledProcessError: Command '['git', 'push', 'origin', 'gh-pages', '--force']' returned non-zero exit status 128.
botにpushの権限がないのが原因。GitHubのリポジトリから
Setting > Action > General > Workflow permissions
で
Read and write permissions
にチェックすると直る。