docs.yml

 1name: Docs
 2
 3on:
 4  pull_request:
 5    paths:
 6      - "docs/**"
 7  push:
 8    branches:
 9      - main
10
11jobs:
12  check_formatting:
13    name: "Check formatting"
14    if: github.repository_owner == 'zed-industries'
15    runs-on: ubuntu-latest
16
17    steps:
18      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
19
20      - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
21        with:
22          version: 9
23
24      - name: Prettier Check on /docs
25        working-directory: ./docs
26        run: |
27          pnpm dlx prettier@${PRETTIER_VERSION} . --check || {
28            echo "To fix, run from the root of the zed repo:"
29            echo "  cd docs && pnpm dlx prettier@${PRETTIER_VERSION} . --write && cd .."
30            false
31          }
32        env:
33          PRETTIER_VERSION: 3.5.0
34
35      - name: Check for Typos with Typos-CLI
36        uses: crate-ci/typos@8e6a4285bcbde632c5d79900a7779746e8b7ea3f # v1.24.6
37        with:
38          config: ./typos.toml
39          files: ./docs/