diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index c6c86a39e..9fb27ffff 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -61,6 +61,16 @@ jobs: VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} CODER_DOCS_MAIN_BRANCH: ${{ github.event.pull_request.head.sha }} + # This ensures the docs site is built properly + # as it will sometimes throw a 404 or 500 + # error if Markdown/parsing errors are present + - name: Install node_modules + run: yarn install + - name: Check docs + run: yarn ts-node ./product/coder.com/site/scripts/checkDocs.ts + env: + BASE_URL: ${{ steps.preview.outputs.url }} + - name: Update Deployment # If we don't specify always, it won't run this check if failed. # This means the deployment would be stuck pending.