1 name: "Check NixOS Manual DocBook rendering against MD rendering"
6 # * is a special character in YAML so you have to quote this string
14 check-rendering-equivalence:
16 pull-requests: write # for peter-evans/create-or-update-comment to create or update comment
17 if: github.repository_owner == 'NixOS'
18 runs-on: ubuntu-latest
20 - uses: actions/checkout@v3
21 - uses: cachix/install-nix-action@v20
23 # explicitly enable sandbox
24 extra_nix_config: sandbox = true
25 - uses: cachix/cachix-action@v12
27 # This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
29 signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
31 - name: Build DocBook and MD manuals
33 export NIX_PATH=nixpkgs=$(pwd)
35 --option restrict-eval true \
36 -o docbook nixos/release.nix \
37 -A manual.x86_64-linux
39 --option restrict-eval true \
40 --arg configuration '{ documentation.nixos.options.allowDocBook = false; }' \
41 -o md nixos/release.nix \
42 -A manual.x86_64-linux
44 - name: Compare DocBook and MD manuals
47 export NIX_PATH=nixpkgs=$(pwd)
48 .github/workflows/compare-manuals.sh \
49 docbook/share/doc/nixos/options.html \
50 md/share/doc/nixos/options.html
52 # if the manual can't be built we don't want to notify anyone.
53 # while this may temporarily hide rendering failures it will be a lot
54 # less noisy until all nixpkgs pull requests have stopped using
55 # docbook for option docs.
56 - name: Comment on failure
57 uses: peter-evans/create-or-update-comment@v3
58 if: ${{ failure() && steps.check.conclusion == 'failure' }}
62 Markdown and DocBook manuals do not agree.
64 Check https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }} for details.