Skip to content

Commit

Permalink
Switch to taskfile
Browse files Browse the repository at this point in the history
- Create a task for deployment
- Move the allowed-wordlist tidy script
  • Loading branch information
davidjharder committed Mar 19, 2024
1 parent 7c38a32 commit 204367a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 19 deletions.
18 changes: 0 additions & 18 deletions .cspell-sort-wordlist.sh

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Please lint and spellcheck your contributions before creating a pull request. We
- Command: `yarn cspell`
- Note that we use American spelling
- If you use vscode with the Code Spell Checker extension, the custom dictionary will be used
- You can tidy the allowed-wordlist with `go-task tidy-words`

### NVM

Expand Down Expand Up @@ -67,7 +68,7 @@ Ensure that you can successfully generate a static site as above.

Then, when you're ready to deploy, run the following:

`git switch deploy && git merge master`
`go-task deploy`

This obviously assumes that you have ssh push access to the `help-center-docs` repository and are using `[email protected]:getsolus/help-center-docs.git` (as listed by `git config -l`).

Expand Down
32 changes: 32 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: '3'

set: [pipefail]

tasks:
# Ensure people new to go-task and used to 'make help' have an easier time
help:
desc: Show how to list available tasks
cmds:
- |
echo "Use 'go-task -l/--list' to list available tasks."
# Merge "master" into "deploy" branch for GitHub pages deployment
deploy:
desc: Merge the "master" branch into "deploy" to start GitHub Pages build
cmds:
- git switch master
- git pull origin master
- git switch deploy
- git merge master
- git push origin deploy
- git switch master

# Tidy up the allowed-words list
tidy-words:
desc: Tidy and sort the allowed-words list
env:
TARGET: .cspell-allowed-words.txt
cmds:
- awk -i inplace '{print tolower($0)}' $TARGET
- sort -o $TARGET $TARGET
- awk -i inplace '!seen[$0]++' $TARGET

0 comments on commit 204367a

Please sign in to comment.