Skip to content

Commit 57336cf

Browse files
committed
Handle prettify differently for repos
1 parent abf22b7 commit 57336cf

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/prettier.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,23 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14+
if: github.event.pull_request.head.repo.full_name == 'XTLS/Xray-docs-next'
1415
uses: actions/checkout@v4
1516
with:
1617
ref: ${{ github.head_ref }}
18+
- name: Checkout
19+
if: github.event.pull_request.head.repo.full_name != 'XTLS/Xray-docs-next'
20+
uses: actions/checkout@v4
1721

1822
- name: Prettify code
23+
if: github.event.pull_request.head.repo.full_name == 'XTLS/Xray-docs-next'
24+
uses: creyD/[email protected]
25+
with:
26+
prettier_options: --write **/*.{js,ts,md,vue}
27+
- name: Prettify code
28+
if: github.event.pull_request.head.repo.full_name != 'XTLS/Xray-docs-next'
1929
uses: creyD/[email protected]
2030
with:
2131
prettier_options: --write **/*.{js,ts,md,vue}
32+
only_changed: true
33+
dry: true

0 commit comments

Comments
 (0)