chore: prettier-fix files already failing check on main #108
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Format Docs (prettier) | |
| on: | |
| pull_request: | |
| paths: | |
| - "docs/**/*.md" | |
| jobs: | |
| prettier: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| # Fork PRs: head_ref only exists on the head repo, not upstream origin | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Prettify and commit (same-repo PR) | |
| if: github.event.pull_request.head.repo.full_name == github.repository | |
| uses: creyD/prettier_action@v4.5 | |
| with: | |
| prettier_options: --write docs/**/*.md | |
| only_changed: True | |
| same_commit: True | |
| - name: Check docs formatting (fork PR) | |
| if: github.event.pull_request.head.repo.full_name != github.repository | |
| uses: creyD/prettier_action@v4.5 | |
| with: | |
| # GITHUB_TOKEN cannot push to a fork; check only | |
| prettier_options: --check docs/**/*.md | |
| only_changed: True |