Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Prettier in CI via NPM #487

Merged
merged 1 commit into from
Jul 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ jobs:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.ref }}

- name: Prettify code
uses: creyD/prettier_action@v4.3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
# This part is also where you can pass other options, for example:
prettier_options: --write **/*.{css,dita*,json,md,scss,xml,yaml,yml}
# Install Prettier XML plugin
prettier_plugins: '@prettier/plugin-xml'
# Runs the action in dry mode. Files wont get changed and the action fails if there are unprettified files.
dry: true
node-version: '18.x'
cache: 'npm'

- name: Install dependencies
run: |
npm ci

- name: Prettify code
run: |
npm run check