actions-gh-pages
actions-gh-pages copied to clipboard
support: action failed with "fetch first" hint
Checklist
- [X] I am using the latest version of this action.
- [X] I have read the latest README and followed the instructions.
- [X] I have read the latest GitHub Actions official documentation and learned the basic spec and concepts.
Describe your question
First of all, thanks for this awesome action !
I'm using it from a job with a matrix configuration, so the action may run concurrently.
Sometimes, it fails because the gh-pages branch is not up-to-date (see logs).
Any advice to prevent this?
Relevant links
My repository is private.
Relevant log output
Push the commit or tag
/usr/bin/git push origin gh-pages
To https://github.com/semarchy/mdm.git
! [rejected] gh-pages -> gh-pages (fetch first)
error: failed to push some refs to 'https://github.com/***/mdm.git'
hint: Updates were rejected because the remote contains work that you do not
hint: have locally. This is usually caused by another repository pushing to
hint: the same ref. If you want to integrate the remote changes, use
hint: 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Error: Action failed with "The process '/usr/bin/git' failed with exit code 1"
Additional context.
My matrix configuration:
matrix:
browser: [ chrome, firefox ]
java_version: [ "17", "21" ]
How I have configured the step:
- name: Upload report to GH Pages
uses: peaceiris/actions-gh-pages@v4
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: playwright-report/
destination_dir: "${{ env.TIMESTAMP }}/${{ matrix.browser }}/java${{ matrix.java_version }}/report"
Note that I see discussion here, but in my case I do want my jobs to run in parallel.
Thanks, this seems to be related to #759
- https://github.com/peaceiris/actions-gh-pages/issues/759
Thank you, indeed, a retry mechanism would help. For now, I an using Wandalen retry action and it works fine.
i would appreciate a retry mechanism, but i'm not sure it would help. this action pushes, another action before this did the pull. i think a fetch or force command is needed. more generically could be described be features such as a retry-mechanism, either pre-commit or on-retry script, 'git_push_additional_args'