Skip to content

Commit

Permalink
[docsy][CI] check-format workflow: drop unnecessary setup (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin authored Dec 13, 2024
1 parent 5c805fa commit fd024da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,13 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Create NPM cache-hash input file
run: |
mkdir -p tmp
jq '{devDependencies, engines, gitHubActionCacheKey}' package.json > tmp/package-ci.json
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: tmp/package-ci.json
cache-dependency-path: package.json

- name: Check file format
run: npm run check:format --ignore-scripts
run: |
npm run __install:prettier
npm run check:format
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "docsy-user-guide",
"scripts": {
"__install:prettier": "npm install prettier@$(npm pkg get devDependencies.prettier | tr -d '^\"') --no-save",
"_build": "npm run _hugo-dev --",
"_check:format": "npx prettier@$(npm pkg get devDependencies.prettier | tr -d '^\"') --check .",
"_check:format": "npx prettier --check .",
"_check:links": "make check-links",
"_check:links--warn": "npm run _check:links || (echo; echo 'WARNING: see link-checker output for issues.'; echo)",
"_filename-error": "echo 'ERROR: the following files violate naming conventions; fix using: `npm run fix:filenames`'; echo; npm run -s _ls-bad-filenames; exit 1",
Expand Down

0 comments on commit fd024da

Please sign in to comment.