-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 1.04 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Continuous Integration
on:
pull_request:
branches: [main]
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
# This is important to fetch the changes to the previous commit
fetch-depth: 0
- name: Setup Node ⚙️
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
with:
cache: yarn
node-version-file: ".nvmrc"
registry-url: https://registry.npmjs.org/
- name: Install dependencies 🚀
run: yarn install
- name: Prettify code
uses: creyD/prettier_action@31355f8eef017f8aeba2e0bc09d8502b13dbbad1 # v4.3
with:
# This part is also where you can pass other options, for example:
prettier_options: --write **/*.{js,md}
only_changed: True