Closed
Description
Describe the bug
Returns an error if you run the action twice in the same job:
fatal: cannot update the ref 'refs/heads/gh-pages': unable to append to '/home/runner/work/repo/repo/.git/logs/refs/heads/gh-pages': Permission denied
...
Error: The deploy step encountered an error: There was an error creating the worktree: The process '/usr/bin/git' failed with exit code 128 ❌ ❌
Notice: Deployment failed! ❌
Reproduction Steps
- uses: tibdex/github-app-token@v1
id: create-app-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: JamesIves/github-pages-deploy-action@v4.2.5
with:
branch: gh-pages
folder: .gh-pages
token: ${{ steps.create-app-token.outputs.token }}
- uses: JamesIves/github-pages-deploy-action@v4.2.5
with:
repository-name: org/api
branch: gh-pages
folder: .api
token: ${{ steps.create-app-token.outputs.token }}
Additional Comments
The error appears only after the second start. If you run the action only once (no matter with or without repository-name property) it works fine.