Skip to content

Commit

Permalink
ci: Verify the HTML documentation is up-to-date
Browse files Browse the repository at this point in the history
Using Fedora image as the ubuntu creates non-standard /usr/etc/... paths without more tweaking

Fixes: OpenSC#3056
  • Loading branch information
Jakuje committed Mar 4, 2024
1 parent 5a9b18a commit 51adaf2
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/setup-fedora.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -ex -o xtrace

# Generic dependencies
DEPS="make /usr/bin/xsltproc docbook-style-xsl autoconf automake libtool bash-completion vim-common softhsm openssl diffutils"
DEPS="make /usr/bin/xsltproc docbook-style-xsl autoconf automake libtool bash-completion vim-common softhsm openssl diffutils git"

if [ "$1" == "clang" ]; then
DEPS="$DEPS clang"
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
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:
- run: dnf install -y git
- uses: actions/checkout@v3
- run: .github/setup-fedora.sh
- run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
./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
)

0 comments on commit 51adaf2

Please sign in to comment.