1
0
mirror of https://github.com/XTLS/Xray-docs-next.git synced 2025-08-22 19:38:36 +00:00
Xray-docs-next/.github/workflows/prettier.yml
2025-07-09 22:34:31 -04:00

34 lines
978 B
YAML

name: Prettier Action
on:
pull_request:
branches: [main]
permissions:
contents: write
jobs:
prettier:
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