Skip to content

Commit 7935f9c

Browse files
committed
try
1 parent d5ffb0b commit 7935f9c

File tree

3 files changed

+146
-19
lines changed

3 files changed

+146
-19
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
GitHub
2+
Markdown
3+
YAML
4+
PySpelling
5+
CI
6+
CD
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
_site/
2+
node_modules/
3+
docs/vendor/

.github/workflows/spelling.yml

Lines changed: 137 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,146 @@
1-
name: Spellcheck PR Diff
1+
name: Check Spelling
2+
3+
# Comment management is handled through a secondary job, for details see:
4+
# https://github.com/check-spelling/check-spelling/wiki/Feature%3A-Restricted-Permissions
5+
#
6+
# `jobs.comment-push` runs when a push is made to a repository and the `jobs.spelling` job needs to make a comment
7+
# (in odd cases, it might actually run just to collapse a comment, but that's fairly rare)
8+
# it needs `contents: write` in order to add a comment.
9+
#
10+
# `jobs.comment-pr` runs when a pull_request is made to a repository and the `jobs.spelling` job needs to make a comment
11+
# or collapse a comment (in the case where it had previously made a comment and now no longer needs to show a comment)
12+
# it needs `pull-requests: write` in order to manipulate those comments.
13+
14+
# Updating pull request branches is managed via comment handling.
15+
# For details, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-expect-list
16+
#
17+
# These elements work together to make it happen:
18+
#
19+
# `on.issue_comment`
20+
# This event listens to comments by users asking to update the metadata.
21+
#
22+
# `jobs.update`
23+
# This job runs in response to an issue_comment and will push a new commit
24+
# to update the spelling metadata.
25+
#
26+
# `with.experimental_apply_changes_via_bot`
27+
# Tells the action to support and generate messages that enable it
28+
# to make a commit to update the spelling metadata.
29+
#
30+
# `with.ssh_key`
31+
# In order to trigger workflows when the commit is made, you can provide a
32+
# secret (typically, a write-enabled github deploy key).
33+
#
34+
# For background, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key
35+
36+
# Sarif reporting
37+
#
38+
# Access to Sarif reports is generally restricted (by GitHub) to members of the repository.
39+
#
40+
# Requires enabling `security-events: write`
41+
# and configuring the action with `use_sarif: 1`
42+
#
43+
# For information on the feature, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Sarif-output
44+
45+
# Minimal workflow structure:
46+
#
47+
# on:
48+
# push:
49+
# ...
50+
# pull_request_target:
51+
# ...
52+
# jobs:
53+
# # you only want the spelling job, all others should be omitted
54+
# spelling:
55+
# # remove `security-events: write` and `use_sarif: 1`
56+
# # remove `experimental_apply_changes_via_bot: 1`
57+
# ... otherwise adjust the `with:` as you wish
258

359
on:
60+
push:
61+
branches:
62+
- "**"
63+
tags-ignore:
64+
- "**"
465
pull_request:
566
branches:
6-
- master
67+
- "**"
68+
types:
69+
- "opened"
70+
- "reopened"
71+
- "synchronize"
72+
issue_comment:
73+
types:
74+
- "created"
775

876
jobs:
9-
spellcheck:
10-
name: Spellcheck PR Diff
77+
spelling:
78+
name: Check Spelling
79+
permissions:
80+
contents: read
81+
actions: read
82+
security-events: write
83+
outputs:
84+
followup: ${{ steps.spelling.outputs.followup }}
1185
runs-on: ubuntu-latest
86+
# if on repo to avoid failing runs on forks
87+
if: |
88+
github.repository == 'compiler-research/compiler-research.github.io'
89+
&& (contains(github.event_name, 'pull_request') || github.event_name == 'push')
90+
concurrency:
91+
group: spelling-${{ github.event.pull_request.number || github.ref }}
92+
# note: If you use only_check_changed_files, you do not want cancel-in-progress
93+
cancel-in-progress: false
1294
steps:
13-
- uses: actions/checkout@v4
14-
- name: Install aspell
15-
run: |
16-
sudo apt-get install -y aspell aspell-en
17-
- name: Set up Python
18-
uses: actions/setup-python@v5
19-
with:
20-
python-version: 3.11
21-
- uses: compiler-research/git-spell-check@master
95+
- name: check-spelling
96+
id: spelling
97+
uses: check-spelling/check-spelling@main
2298
with:
23-
debug: 1
24-
- name: Setup tmate session
25-
if: ${{ !cancelled() && runner.debug }}
26-
uses: mxschmitt/action-tmate@v3
27-
# When debugging increase to a suitable value!
28-
timeout-minutes: 30
99+
suppress_push_for_open_pull_request: ${{ github.actor != 'dependabot[bot]' && 1 }}
100+
checkout: true
101+
check_file_names: 1
102+
spell_check_this: check-spelling/spell-check-this@main
103+
post_comment: 0
104+
use_magic_file: 1
105+
report-timing: 1
106+
warnings: bad-regex,binary-file,deprecated-feature,ignored-expect-variant,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,token-is-substring,unexpected-line-ending,whitespace-in-dictionary,minified-file,unsupported-configuration,no-files-to-check,unclosed-block-ignore-begin,unclosed-block-ignore-end
107+
experimental_apply_changes_via_bot: 1
108+
dictionary_source_prefixes: '{"cspell": "https://raw.githubusercontent.com/streetsidesoftware/cspell-dicts/main/dictionaries/"}'
109+
extra_dictionaries: |
110+
cspell:aws/dict/aws.txt
111+
cspell:bash/samples/bash-words.txt
112+
cspell:companies/dict/companies.txt
113+
cspell:css/dict/css.txt
114+
cspell:data-science/dict/data-science-models.txt
115+
cspell:data-science/dict/data-science.txt
116+
cspell:data-science/dict/data-science-tools.txt
117+
cspell:en_shared/dict/acronyms.txt
118+
cspell:en_shared/dict/shared-additional-words.txt
119+
cspell:en_GB/en_GB.trie
120+
cspell:en_US/en_US.trie
121+
cspell:filetypes/src/filetypes.txt
122+
cspell:fonts/dict/fonts.txt
123+
cspell:fullstack/dict/fullstack.txt
124+
cspell:golang/dict/go.txt
125+
cspell:google/dict/google.txt
126+
cspell:html/dict/html.txt
127+
cspell:java/src/java.txt
128+
cspell:k8s/dict/k8s.txt
129+
cspell:mnemonics/dict/mnemonics.txt
130+
cspell:monkeyc/src/monkeyc_keywords.txt
131+
cspell:node/dict/node.txt
132+
cspell:npm/dict/npm.txt
133+
cspell:people-names/dict/people-names.txt
134+
cspell:python/dict/python.txt
135+
cspell:python/dict/python-common.txt
136+
cspell:shell/dict/shell-all-words.txt
137+
cspell:software-terms/dict/softwareTerms.txt
138+
cspell:software-terms/dict/webServices.txt
139+
cspell:sql/src/common-terms.txt
140+
cspell:sql/src/sql.txt
141+
cspell:sql/src/tsql.txt
142+
cspell:terraform/dict/terraform.txt
143+
cspell:typescript/dict/typescript.txt
144+
check_extra_dictionaries: ''
145+
only_check_changed_files: true
146+
longest_word: "10"

0 commit comments

Comments
 (0)