ci: install prettier globally
This commit is contained in:
9
.github/workflows/format.yml
vendored
9
.github/workflows/format.yml
vendored
@@ -3,7 +3,8 @@ on:
|
||||
push:
|
||||
paths:
|
||||
- 'lua/**.lua'
|
||||
branches: [main]
|
||||
- '**.md'
|
||||
branches: [main, dev]
|
||||
|
||||
jobs:
|
||||
format:
|
||||
@@ -16,6 +17,7 @@ jobs:
|
||||
STYLUA_VERSION: 0.11.0
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
|
||||
- name: Setup git
|
||||
run: |
|
||||
@@ -31,6 +33,11 @@ jobs:
|
||||
chmod +x /tmp/stylua
|
||||
/tmp/stylua --config-path=.stylua.toml lua/
|
||||
|
||||
- name: Apply prettier
|
||||
run: |
|
||||
npm install -g prettier
|
||||
prettier --write **/*.md
|
||||
|
||||
- name: Create PR
|
||||
run: |
|
||||
if ! [[ -z $(git status -s) ]]; then
|
||||
|
||||
Reference in New Issue
Block a user