From 57336cf815a1747315e24c647247eb8127bc3fd5 Mon Sep 17 00:00:00 2001 From: yuhan6665 <1588741+yuhan6665@users.noreply.github.com> Date: Wed, 9 Jul 2025 22:34:04 -0400 Subject: [PATCH] Handle prettify differently for repos --- .github/workflows/prettier.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 65b87c7..884fbd7 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -11,11 +11,23 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout + if: github.event.pull_request.head.repo.full_name == 'XTLS/Xray-docs-next' uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} + - name: Checkout + if: github.event.pull_request.head.repo.full_name != 'XTLS/Xray-docs-next' + uses: actions/checkout@v4 - name: Prettify code + if: github.event.pull_request.head.repo.full_name == 'XTLS/Xray-docs-next' uses: creyD/prettier_action@v4.6 with: prettier_options: --write **/*.{js,ts,md,vue} + - name: Prettify code + if: github.event.pull_request.head.repo.full_name != 'XTLS/Xray-docs-next' + uses: creyD/prettier_action@v4.6 + with: + prettier_options: --write **/*.{js,ts,md,vue} + only_changed: true + dry: true