diff --git a/.github/workflows/docs-check.yml b/.github/workflows/docs-check.yml new file mode 100644 index 00000000000..88000697fc8 --- /dev/null +++ b/.github/workflows/docs-check.yml @@ -0,0 +1,43 @@ +name: Docs Check + +# Cancel workflow if there is a new change to the branch. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +on: + push: + branches: + - main + paths: + - '**.md' + - '.github/workflows/docs-check.yml' + merge_group: + pull_request: + branches: + - main + paths: + - '**.md' + - '.github/workflows/docs-check.yml' + +jobs: + docs-check: + name: Check + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./docs + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18 + # See https://github.com/actions/setup-node/issues/1027 + # cache: yarn + - run: corepack enable + - run: make format-spellcheck-dictionary-check + - run: yarn --immutable + - run: yarn typecheck + - run: yarn spellcheck + - run: yarn format-check + - run: yarn build