-
Notifications
You must be signed in to change notification settings - Fork 705
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Verify the HTML documentation is up-to-date
Using Fedora image as the ubuntu creates non-standard /usr/etc/... paths without more tweaking Fixes: #3056
- Loading branch information
Showing
1 changed file
with
40 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,40 @@ | ||
--- | ||
name: Make sure HTML files are updated | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '**.xml' | ||
- '**.xml.in' | ||
- .github/workflows/doc.yml | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: fedora:latest | ||
steps: | ||
# Do this before checkout otherwise we will not have a git repository | ||
- run: dnf install -y git | ||
- uses: actions/checkout@v3 | ||
- run: .github/setup-fedora.sh | ||
# git checkout to revert changes to tests/Makefile.am done by the setup | ||
- run: | | ||
git config --global --add safe.directory $GITHUB_WORKSPACE && | ||
git checkout tests/Makefile.am && | ||
./bootstrap && | ||
./configure --prefix="/usr" --enable-doc && | ||
cd doc/tools && | ||
rm tools.html && | ||
make tools.html && | ||
cd ../files && | ||
rm files.html && | ||
make files.html && | ||
cd ../../ && | ||
git diff --exit-code --color || ( | ||
echo "The documentation files were changed!" | ||
echo -n "Regenerate the HTML files with " | ||
echo -n "\`make tools.html\` in \`doc/tools\` and " | ||
echo -n "\`make files.html\`in \`doc/files\` or apply the above patch" | ||
exit 1 | ||
) |