-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add separate workflow for content check, with reviewdog support (#…
…2714) * ci: add separate workflow for content check, with reviewdog support * ci(content-check): improve step setup * docs: add style error on purpose to test the ci action * docs: revert testing change
- Loading branch information
Showing
2 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Documentation content check | ||
|
||
# The `vale` GitHub action does not work on PR events so this is triggered on all pushes. | ||
on: [pull_request] | ||
|
||
jobs: | ||
writing_style: | ||
runs-on: ubuntu-latest | ||
|
||
timeout-minutes: 5 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node (uses version in .nvmrc) | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Download .vale.ini and style rules from @commercetools-docs/writing-style | ||
run: | | ||
package_version=$(node -e "console.log(require('./package.json').dependencies['$PACKAGE_NAME'])") | ||
echo "Removing package.json and yarn.lock to avoid installation issues" | ||
rm package.json yarn.lock | ||
echo "Installing $PACKAGE_NAME@$package_version" | ||
npm install --no-save "$PACKAGE_NAME@$package_version" | ||
env: | ||
PACKAGE_NAME: '@commercetools-docs/writing-style' | ||
|
||
- name: Check content (generates GitHub comments via `reviewdog`) | ||
uses: errata-ai/vale-action@reviewdog | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
files: '["website"]' | ||
reporter: github-pr-review | ||
filter_mode: diff_context | ||
fail_on_error: true | ||
vale_flags: '--config=node_modules/@commercetools-docs/writing-style/.vale.ini' | ||
debug: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4d7d1f9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for merchant-center-application-kit ready!
✅ Preview
https://merchant-center-application-2a3ua0u1c-commercetools.vercel.app
Built with commit 4d7d1f9.
This pull request is being automatically deployed with vercel-action