Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into bobjwalker/cloud-task…
Browse files Browse the repository at this point in the history
…-caps
  • Loading branch information
BobJWalker committed Oct 20, 2023
2 parents 9deac40 + 5751cb8 commit fe9cf85
Show file tree
Hide file tree
Showing 16 changed files with 945 additions and 24 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/branch-spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Spellcheck

on: pull_request

# Allow this job to clone the repo
permissions:
contents: read
id-token: write

jobs:
spellcheck:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8.7.0
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: PNPM and Playwright install
run: |
echo; echo "cd to workspace"
cd $GITHUB_WORKSPACE
echo; echo "listing"
ls
echo; echo "NPM install"
pnpm install
- name: Check spellings
run: |
pnpm spellcheck
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ log/
obj/
_site/
.vs/
.vscode/
.idea
*.iml
**/*.dia~
Expand Down
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"markdown.validate.enabled": false,
"files.associations": {
"*.mdx": "markdown"
},
}
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,45 @@ See the [Octopus style guide](https://www.octopus.design/932c0f1a9/p/26f741-writ
* Sign the [Contribution License Agreement (CLA)](https://cla-assistant.io/OctopusDeploy/docs)
* We'll review your PR and accept it or suggest changes

## Required checks

When you raise a pull request, the following checks will take place:

1. A full test
2. A spell-check

### Test

You can run the tests locally using:

```
pnpm test
```

The most common failures are:

- A new image is referenced with the wrong path
- An internal link has a bad address

### Spell check

You can run the spell check locally using:

```
pnpm spellcheck
```

Only changed files are checked for spelling. If a file hasn't been edited since this check was introduced, you may have to fix some old spelling issues.

For each error detected, you'll need to decide whether to:

- Correct your spelling, or
- Propose an addition to the custom dictionary

For example, if you added `MySQL` to an article and it was flagged as an unknown word, you could propose the addition of `MySQL` by adding it word list in the file `dictionary-octopus.txt`.

Some consideration should be given as to whether it should be `MySQL` or `MySql` and just a single entry should be added to `dictionary-octopus.txt` to promote consistency.

## Deploying to preview environment (Octopus Developers)

Before merging to `main` it's possible you'd like to see your changes in a preview environment. It's simple to do this:
Expand Down
20 changes: 20 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": "0.2",
"language": "en",
"dictionaries": ["dictionary-octopus"],
"dictionaryDefinitions": [{
"name": "dictionary-octopus",
"path": "./dictionary-octopus.txt",
"addWords": false
}],
"flagWords": [
"hte"
],
"ignorePaths": [
"cspell.json",
"package.json",
"package-lock.yaml",
"pnpm-lock.yaml",
"node_modules/**"
]
}
5 changes: 5 additions & 0 deletions dictionary-octopus.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
astro
runbook
Runbook
reprovisioned
reprovisioning
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"img": "node --no-experimental-fetch ./src/themes/accelerator/utilities/img.mjs",
"dev": "node --no-experimental-fetch ./src/themes/accelerator/utilities/img.mjs && astro dev",
"test": "astro build && npx playwright install --with-deps && npx playwright test",
"spellcheck": "git fetch origin main:refs/remotes/origin/main && git diff origin/main --name-only | cspell --file-list stdin",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
Expand All @@ -21,6 +22,7 @@
"dependencies": {
"@astrojs/mdx": "^1.0.0",
"astro": "^3.0.3",
"cspell": "^7.3.7",
"astro-accelerator": "^0.3.12",
"astro-accelerator-utils": "^0.3.2",
"hast-util-from-selector": "^3.0.0",
Expand Down
Loading

0 comments on commit fe9cf85

Please sign in to comment.