diff --git a/.github/workflows/docs-check.yml b/.github/workflows/docs-check.yml index 13537a2768d6..78ef10f23031 100644 --- a/.github/workflows/docs-check.yml +++ b/.github/workflows/docs-check.yml @@ -31,12 +31,8 @@ jobs: working-directory: ./docs steps: - uses: actions/checkout@v6 - - uses: actions/setup-node@v6 - with: - node-version: 20 - package-manager-cache: false - - run: corepack enable - - run: make format-spellcheck-dictionary-check + - uses: jdx/mise-action@v3 + - run: mise run docs:format-spellcheck-dictionary-check - run: yarn --immutable - run: yarn typecheck - run: yarn spellcheck diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 306eeeb4f24c..000000000000 --- a/docs/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -SPELLCHECK_DICTIONARY=./dictionary.txt -format-spellcheck-dictionary: - @cat $(SPELLCHECK_DICTIONARY) | sort --ignore-case | uniq > $(SPELLCHECK_DICTIONARY).tmp - @mv $(SPELLCHECK_DICTIONARY).tmp $(SPELLCHECK_DICTIONARY) - -format-spellcheck-dictionary-check: - @cat $(SPELLCHECK_DICTIONARY) | sort --ignore-case | uniq > $(SPELLCHECK_DICTIONARY).tmp - @diff $(SPELLCHECK_DICTIONARY) $(SPELLCHECK_DICTIONARY).tmp - @rm $(SPELLCHECK_DICTIONARY).tmp diff --git a/mise.toml b/mise.toml index c5454a19b762..ffc833a3d3ac 100644 --- a/mise.toml +++ b/mise.toml @@ -170,6 +170,25 @@ run = ''' cargo llvm-cov -p forest-filecoin --codecov --output-path lcov.info ''' +[tasks."docs:format-spellcheck-dictionary"] +description = "Format and deduplicate the spellcheck dictionary." +dir = "docs" +run = ''' +TMPFILE=$(mktemp) +cat dictionary.txt | sort --ignore-case | uniq > "$TMPFILE" +mv "$TMPFILE" dictionary.txt +''' + +[tasks."docs:format-spellcheck-dictionary-check"] +description = "Check if spellcheck dictionary is properly formatted." +dir = "docs" +run = ''' +TMPFILE=$(mktemp) +trap "rm -f $TMPFILE" EXIT +cat dictionary.txt | sort --ignore-case | uniq > "$TMPFILE" +diff dictionary.txt "$TMPFILE" +''' + [tools] cargo-binstall = "1.16.6" go = "1.25.5"