Dummy commit for testing2 #188
This file contains hidden or 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
| name: Check docs | |
| defaults: | |
| run: | |
| shell: bash | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| paths: | |
| - "docs/**" | |
| - ".spellcheckwordlist.txt" | |
| - ".spellcheck.yml" | |
| - ".markdownlint.jsonc" | |
| - "mkdocs.yml" | |
| - ".readthedocs.yaml" | |
| - ".github/workflows/**" | |
| workflow_dispatch: | |
| inputs: | |
| debug_enabled: | |
| description: 'Run the build with tmate set "debug_enabled"' | |
| type: boolean | |
| required: false | |
| default: false | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| permissions: | |
| actions: write | |
| jobs: | |
| build: | |
| name: Docs check (spellcheck, links, markdownlint, textlint) | |
| # linkspector seems to fail with "No usable sandbox" | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Homebrew | |
| id: set-up-homebrew | |
| uses: Homebrew/actions/setup-homebrew@main | |
| - name: Spellcheck | |
| uses: rojopolis/spellcheck-github-actions@v0 | |
| - name: Install textlint | |
| run: | | |
| npm init -y | |
| npm install textlint textlint-filter-rule-comments textlint-rule-no-todo textlint-rule-stop-words textlint-rule-terminology | |
| - name: Run textlint | |
| uses: tsuyoshicho/action-textlint@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| reporter: github-check | |
| textlint_flags: "{README.md,version-history.md,docs/**}" | |
| - name: Setup tmate session | |
| if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
| uses: mxschmitt/action-tmate@v3 | |
| with: | |
| limit-access-to-actor: true | |
| - name: Run linkspector to check external links | |
| uses: umbrelladocs/action-linkspector@v1.3.5 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| reporter: github-check | |
| fail_on_error: true | |
| # Check links only in the added lines for PRs, but check everything otherwise | |
| filter_mode: ${{ github.event_name == 'pull_request' && 'added' || 'nofilter' }} | |
| config_file: '.linkspector.yml' | |
| - name: Run markdownlint | |
| run: | | |
| npm install -g markdownlint-cli | |
| make markdownlint | |
| - name: Test mkdocs | |
| run: | | |
| sudo pip3 install setuptools | |
| sudo pip3 install -r docs/mkdocs-pip-requirements | |
| mkdocs build -d /tmp/mkdocsbuild |