mirror of
https://github.com/jlengrand/coffeechat.git
synced 2026-03-10 08:11:20 +00:00
create a Prettier GitHub Action for people.json (close #18)
This commit is contained in:
32
.github/workflows/prettify-json.yml
vendored
Normal file
32
.github/workflows/prettify-json.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Prettify people.json
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'people.json'
|
||||
|
||||
jobs:
|
||||
prettify-json:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout this repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.ACTIONS_TOKEN }}
|
||||
|
||||
- name: Setting up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
|
||||
- name: Run prettier
|
||||
run: npx prettier --write people.json
|
||||
|
||||
- name: Commit the changes
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
add: 'people.json'
|
||||
author_name: 'GitHub Actions'
|
||||
author_email: 'actions@github.com'
|
||||
message: 'prettify people.json'
|
||||
3
.prettierrc.json
Normal file
3
.prettierrc.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"tabWidth": 4
|
||||
}
|
||||
Reference in New Issue
Block a user