Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: add proofread #12

Closed
wants to merge 17 commits into from
37 changes: 37 additions & 0 deletions .github/textlintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
plugins:
filters:
# textlint-filter-rule-allowlist
# allowlist:
# allow:
# - build system

rules:
no-todo: true
no-start-duplicated-conjunction: true
# alive-link:
# language: "en"
# checkRelative: true
# baseURI: https://github.com/boozook/playdate/blob/main/
# ignoreRedirects: true
# ignore:
# - https://crates.io/**
# retry: 3
# timeout: 20
# maxRetryDelay: 20
# # textlint-rule-no-empty-section: true
# # textlint-rule-no-empty-element: true
# # textlint-rule-terminology: true
# textlint-rule-date-weekday-mismatch: true
# textlint-rule-period-in-list-item: true
# textlint-rule-no-zero-width-spaces: true
# textlint-rule-doubled-spaces: true
# textlint-rule-rousseau: true
# textlint-rule-common-misspellings: true
# textlint-rule-write-good: true
# spellcheck-tech-word: true
# "@textlint-rule/textlint-rule-no-duplicate-abbr": true
# # textlint-rule-unexpanded-acronym: false
# # textlint-rule-spelling:
# # language: "en"
# # suggestCorrections: true
# # EXTRA DEP: dictionary-en
90 changes: 90 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Docs
on:
pull_request:
pull_request_target:
workflow_dispatch:
inputs:
path:
description: "Path to docs (glob)"
default: ./**/*.md
type: string
required: true

jobs:
test:
name: Proofread
permissions:
pull-requests: write
contents: read
actions: read
statuses: read
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Check
uses: awreck/proofread-action@v1
id: proofread
with:
token: ${{ secrets.GITHUB_TOKEN }}

lint:
name: Check
permissions:
pull-requests: write
contents: read
actions: read
statuses: read
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4

- name: Changes
id: changes
if: ${{ startsWith(github.event_name, 'pull_request') }}
uses: tj-actions/changed-files@v39
with:
since_last_remote_commit: true
files: "**/*.{md,txt}"
# files_yaml: |
# text:
# - '**/*.txt'
# - '**/*.md'
# - README.md

- name: Config
run: cp -rf .github/textlintrc.yml .textlintrc.yaml

- name: text lint
uses: rdohms/[email protected]
with:
# List required ruleset packages
rulesets: >-
textlint-filter-rule-allowlist
textlint-rule-no-todo
textlint-rule-alive-link
textlint-rule-no-start-duplicated-conjunction
textlint-rule-date-weekday-mismatch
textlint-rule-period-in-list-item
textlint-rule-no-zero-width-spaces
textlint-rule-doubled-spaces
@textlint-rule/textlint-rule-no-duplicate-abbr
textlint-rule-rousseau
textlint-rule-common-misspellings
textlint-rule-write-good
textlint-rule-spellcheck-tech-word
textlint-rule-alex
textlint-rule-en-capitalization
textlint-rule-no-empty-section
textlint-rule-no-exclamation-question-mark
textlint-rule-spelling dictionary-en
[email protected] textlint-extra-terms
textlint-rule-en-spell
# textlint-rule-spellchecke
# textlint-rule-standardize
# textlint-rule-no-empty-section
# textlint-rule-no-empty-element
# textlint-rule-terminology
path: ${{ github.event.inputs.path || steps.changes.outputs.all_changed_files || './**/*.md' }} # mb. null-fallback?
annotate: ${{ github.event.inputs.path && 'false' || 'true' }}
token: ${{ secrets.GITHUB_TOKEN }}