diff --git a/.github/workflows/docs-spelling-checks.yml b/.github/workflows/docs-spelling-checks.yml new file mode 100644 index 000000000..96bfa636f --- /dev/null +++ b/.github/workflows/docs-spelling-checks.yml @@ -0,0 +1,30 @@ +name: Documentation Spelling Check + +on: + workflow_dispatch: + pull_request: + paths: + - 'docs/**' + +jobs: + spell-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install aspell + run: sudo apt-get install aspell aspell-en + - id: spell-check + name: Spell Check + run: make spelling + working-directory: docs/tools + continue-on-error: true + - if: ${{ github.event_name == 'pull_request' && steps.spell-check.outcome == 'failure' }} + uses: actions/github-script@v6 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Hi, looks like pyspelling job found some issues, you can check it [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})' + }) diff --git a/docs/moonray/.sphinx/requirements.txt b/docs/moonray/.sphinx/requirements.txt index c019f178a..fd19a7b47 100644 --- a/docs/moonray/.sphinx/requirements.txt +++ b/docs/moonray/.sphinx/requirements.txt @@ -1,2 +1,3 @@ git+https://github.com/canonical/canonical-sphinx@main#egg=canonical-sphinx sphinx-autobuild +pyspelling diff --git a/docs/tools/.custom_wordlist.txt b/docs/tools/.custom_wordlist.txt index e69de29bb..7893c42d2 100644 --- a/docs/tools/.custom_wordlist.txt +++ b/docs/tools/.custom_wordlist.txt @@ -0,0 +1,66 @@ +apiserver +apparmor +AppArmor +autostart +aws +CAPI +Ceph +cgroup +CIDRS +CIDRs +CNI +config +containerd +CoreDNS +CPUs +cpuset +daemonset +datastore +dbus +DNS +dqlite +EasyRSA +etcd +GCP +ghcr +grafana +html +http +https +initialise +juju +kubeconfig +kubectl +kubelet +kubepods +kubernetes +libcontainer +lifecycle +linux +localhost +lxc +LXD +MAAS +Multipass +nameservers +NGINX +OCI +OpenStack +proc +RBAC +regsync +roadmap +Rockcraft +rw +snapd +stackexchange +sys +systemd +TLS +ubuntu +unix +VMs +VMWare +VSphere +www +yaml diff --git a/docs/tools/.sphinx/spellingcheck.yaml b/docs/tools/.sphinx/spellingcheck.yaml index fc9d3c503..b907c5d67 100644 --- a/docs/tools/.sphinx/spellingcheck.yaml +++ b/docs/tools/.sphinx/spellingcheck.yaml @@ -9,7 +9,7 @@ matrix: - .custom_wordlist.txt output: .sphinx/.wordlist.dic sources: - - _build/**/*.html + - ../_build/**/*.html pipeline: - pyspelling.filters.html: comments: false @@ -21,7 +21,6 @@ matrix: - pre - spellexception - link - - title - div.relatedlinks - strong.command - div.visually-hidden