Skip to content

Commit

Permalink
Update 11ty-publish workflow to use git-auto-commit-action (#4154)
Browse files Browse the repository at this point in the history
This update resolves spurious errors in the publish workflow in cases
where a merge to `main` results in no changes to push to `gh-pages`.

- [Example of the type of error this
addresses](https://github.com/kfranqueiro/wcag/actions/runs/12036136821/job/33556666057)
- [Example of the same type of run succeeding with this
change](https://github.com/kfranqueiro/wcag/actions/runs/12036196134/job/33556861412)
- [Example of a run completing with this change, operating as usual when
there are changes to commit to
`gh-pages`](https://github.com/kfranqueiro/wcag/actions/runs/12036639462/job/33558323786)
  • Loading branch information
kfranqueiro authored Nov 27, 2024
1 parent aa43153 commit 6ec98a3
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/11ty-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@ jobs:
curl https://labs.w3.org/spec-generator/?type=respec"&"url=https://raw.githack.com/$GITHUB_REPOSITORY/main/requirements/22/index.html -o _site/requirements/22/index.html -f --retry 3
curl https://labs.w3.org/spec-generator/?type=respec"&"url=https://raw.githack.com/$GITHUB_REPOSITORY/main/conformance-challenges/index.html -o _site/conformance-challenges/index.html -f --retry 3
- name: Push
working-directory: _site
run: |
git config user.email [email protected]
git config user.name w3cgruntbot
git add -A .
git commit -m ":robot: Deploy to GitHub Pages: $GITHUB_SHA from branch $GITHUB_REF"
git push origin gh-pages
uses: stefanzweifel/git-auto-commit-action@v5
with:
repository: _site
branch: gh-pages
commit_user_name: w3cgruntbot
commit_user_email: [email protected]
commit_author: "w3cgruntbot <[email protected]>"
commit_message: ":robot: Deploy to GitHub Pages: ${{ github.sha }} from branch ${{ github.ref }}"
skip_fetch: true
skip_checkout: true

0 comments on commit 6ec98a3

Please sign in to comment.