actions-gh-pages
actions-gh-pages copied to clipboard
proposal: auto-retry
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 proposal
Action fails intermitently due to concurrent updates
Describe the solution you'd like
Action should implement/support an auto retry mechanism e.g. retry: 3
Describe alternatives you've considered
Two consecutive steps for publishing where the second one only runs if the first one fails
Additional context
No response
I think the concurrency.group
already resolves this instead.
jobs:
deploy:
runs-on: ubuntu-20.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
That is an interesting idea, I wonder if it would work for different repos pushing to a central gh-pages repo, considering the same key
The current example workflow on README includes the approach already.
Please try the concurrency.group
first.
name: GitHub Pages
on:
push:
branches:
- main # Set a branch name to trigger deployment
pull_request:
jobs:
deploy:
runs-on: ubuntu-20.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.85.0'
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
@peaceiris, by adding concurrency: group: ${{ github.workflow }}-${{ github.ref }}
does not seem to solve the issue for me.
+1 to this request.
Concurrency group would be undesirable for my situation. I'm using this action (thank you or this great action btw), to publish test reports and adding concurrency group would force our test workflow to run sequentially against different test targets.
Adding a git commit retry on this specific git local out of sync with remote error would be great.