diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4cf9e83af6333..93aa714793fbd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -203,7 +203,16 @@ jobs: go-version: 1.20.5 - name: Install prettier - run: npm install -g prettier + # We only need prettier for fmt, so do not install all dependencies. + # There is no way to install a single package with yarn, so we have to + # make a new package.json with only prettier listed as a dependency. + # Then running `yarn` will only install prettier. + run: | + cd site + mv package.json package.json.bak + jq '{dependencies: {prettier: .devDependencies.prettier}}' < package.json.bak > package.json + yarn --frozen-lockfile + mv package.json.bak package.json - name: Install shfmt run: go install mvdan.cc/sh/v3/cmd/shfmt@v3.5.0