spellcheck.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  2. #
  3. # SPDX-License-Identifier: curl
  4. name: spell
  5. on:
  6. push:
  7. branches:
  8. - master
  9. paths:
  10. - '**.md'
  11. - '**.3'
  12. - '**.1'
  13. - '**/spellcheck.yml'
  14. - '**/spellcheck.yaml'
  15. - '**/wordlist.txt'
  16. pull_request:
  17. branches:
  18. - master
  19. paths:
  20. - '**.md'
  21. - '**.3'
  22. - '**.1'
  23. - '**/spellcheck.yml'
  24. - '**/spellcheck.yaml'
  25. - '**/wordlist.txt'
  26. permissions: {}
  27. jobs:
  28. check:
  29. runs-on: ubuntu-latest
  30. steps:
  31. - uses: actions/checkout@v4
  32. - name: install pandoc
  33. run: sudo apt-get install pandoc
  34. - name: build curl.1
  35. run: |
  36. autoreconf -fi
  37. ./configure --without-ssl --without-libpsl
  38. make -C docs
  39. - name: strip "uncheckable" sections from .3 pages
  40. run: find docs -name "*.3" -size +40c | sed 's/\.3//' | xargs -t -n1 -I OO ./.github/scripts/cleanspell.pl OO.3 OO.33
  41. - name: convert .3 man pages to markdown
  42. run: find docs -name "*.33" -size +40c | sed 's/\.33//' | xargs -t -n1 -I OO pandoc -f man -t markdown OO.33 -o OO.md
  43. - name: convert .1 man pages to markdown
  44. run: find docs -name "*.1" -size +40c | sed 's/\.1//' | xargs -t -n1 -I OO pandoc OO.1 -o OO.md
  45. - name: trim the curl.1 markdown file
  46. run: |
  47. perl -pi -e 's/^ .*//' docs/curl.md
  48. perl -pi -e 's/\-\-[\a-z0-9-]*//ig' docs/curl.md
  49. perl -pi -e 's!https://[a-z0-9%/.-]*!!ig' docs/curl.md
  50. - name: trim the cmdline docs markdown files
  51. run: find docs/cmdline-opts -name "*.md" ! -name "_*" ! -name MANPAGE.md | xargs -n1 ./.github/scripts/cleancmd.pl
  52. - name: trim the cmdline docs markdown _*.md files
  53. run: find docs/cmdline-opts -name "_*.md" | xargs -n1 ./.github/scripts/cleancmd.pl --no-header
  54. - name: setup the custom wordlist
  55. run: grep -v '^#' .github/scripts/spellcheck.words > wordlist.txt
  56. - name: Check Spelling
  57. uses: rojopolis/spellcheck-github-actions@v0
  58. with:
  59. config_path: .github/scripts/spellcheck.yaml