-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add action to run tidy on pushes to the gh-pages branch.
Whenever new commits are pushed, run tidy on `index.html` and create a pull request with the reformatted file if necessary.
- Loading branch information
Raphael Kubo da Costa
committed
Aug 25, 2021
1 parent
5331fa5
commit 49fa684
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Run tidy on spec | ||
on: | ||
push: | ||
branches: | ||
- "gh-pages" | ||
paths: | ||
- "index.html" | ||
|
||
jobs: | ||
tidy: | ||
name: Reformat index.html if necessary | ||
# We need macos-latest because tidy-2:5.6.0 which is present on all Ubuntu | ||
# releases supported by GitHub actions has a bug that causes the documents | ||
# to be wrongly formatted. | ||
# https://github.com/w3c/screen-wake-lock/pull/319 has more details. | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: brew install tidy-html5 | ||
- run: tidy -config tidyrc -modify index.html | ||
- uses: peter-evans/create-pull-request@v3 | ||
with: | ||
body: | | ||
Automated change. | ||
`index.html` reformatted with `tidy -config tidyrc -modify index.html`. | ||
branch: html-tidy | ||
commit-message: "chore: Reformat document using tidy-html5" | ||
delete-branch: true | ||
title: "chore(tidy): reformat index.html" |