Skip to content

Commit 8db566a

Browse files
authored
chore: update action to ensure we get the reference before running "prettier" (#305)
* chore: update action to ensure we get the reference before running "prettier" * chore: update the "prettier" process to take into account only certain file types * chore: add new type of files to be considered by prettier
1 parent ba0cf94 commit 8db566a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,18 @@ jobs:
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@v2
23+
with:
24+
# Make sure the actual branch is checked out when running on pull requests
25+
ref: ${{ github.event.pull_request.base.ref }}
26+
27+
# This is important to fetch the changes to the previous commit
28+
fetch-depth: 0
2329

2430
- name: Prettify code
2531
uses: creyD/[email protected]
32+
with:
33+
prettier_options: "src/**/*.{ts,jsx,js,css,html,json,md}" --write
34+
only_changed: True
2635
build:
2736
# The type of runner that the job will run on
2837
if: github.event_name != 'pull_request'

0 commit comments

Comments
 (0)