Doctor Docs #115
This file contains 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: Doctor Docs | |
on: | |
schedule: | |
- cron: "00 00 * * 1" | |
# Runs on each PR | |
pull_request: | |
branches: | |
- "master" | |
- "main" | |
# Runs on each push | |
push: | |
branches: | |
- "main" | |
- "master" | |
jobs: | |
Checking-Docs: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks out a copy of your repository on the ubuntu-latest machine | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Run link checker on the generated HTML | |
- name: Link Checker | |
id: lychee | |
uses: lycheeverse/lychee-action@2b973e86fc7b1f6b36a93795fe2c9c6ae1118621 # 1.10.0 | |
with: | |
args: > | |
--config ./lychee.toml | |
build/** | |
# - name: Run LanguageTool | |
# uses: reviewdog/action-languagetool@v1 | |
# with: | |
# github_token: ${{ secrets.github_token }} | |
# reporter: github-pr-review | |
# level: info | |
# patterns: "**.md" | |
# language: "en-US" | |
# # LanguageTool flags - see https://languagetool.org/http-api/swagger-ui/#!/default/post_check | |
# enabled_rules: "TYPOS,TYPOGRAPHY,CASING,EN_QUOTES,DASH_RULE,WORD_CONTAINS_UNDERSCORE,UPPERCASE_SENTENCE_START,ARROWS,CURRENCY,EN_UNPAIRED_BRACKETS,PHRASE_REPETITION,PUNCTUATION_PARAGRAPH_END,METRIC_UNITS_EN_US,ENGLISH_WORD_REPEAT_BEGINNING_RULE" | |
# disabled_categories: "WHITESPACE_RULE, COMMA_PARENTHESIS_WHITESPACE,UNLIKELY_OPENING_PUNCTUATION,SENTENCE_WHITESPACE" | |
- name: Run misspell | |
uses: reviewdog/action-misspell@v1 | |
with: | |
github_token: ${{ secrets.github_token }} | |
reporter: github-pr-review | |
pattern: "**.md" | |
level: info | |
locale: "US" | |
- uses: reviewdog/action-alex@v1 | |
with: | |
github_token: ${{ secrets.github_token }} | |
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review]. | |
reporter: github-pr-review | |
# Change reporter level if you need. | |
# GitHub Status Check won't become failure with warning. | |
level: warning | |
- name: Create Issue From File | |
if: | | |
github.event_name != 'pull_request' && | |
env.lychee_exit_code != 0 | |
uses: peter-evans/create-issue-from-file@v5 | |
with: | |
title: Link Checker Report | |
content-filepath: ./lychee/out.md | |
labels: good-first-issue, automated issue |