diff --git a/.github/workflows/mintlify-check.yml b/.github/workflows/mintlify-check.yml new file mode 100644 index 00000000..2ba11b99 --- /dev/null +++ b/.github/workflows/mintlify-check.yml @@ -0,0 +1,50 @@ +name: Mintlify Documentation Check +on: + pull_request: + paths: + - 'docs/**' # Only trigger on changes to docs directory + - 'mint.json' # Also trigger on mintlify config changes + +jobs: + build-docs: + name: Build Documentation + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + cache: 'npm' + + - name: Install Mintlify + run: npm install -g mintlify + + - name: Build documentation + run: | + cd docs + mintlify build + + - name: Check build status + run: | + if [ $? -eq 0 ]; then + echo "Documentation build successful!" + else + echo "Documentation build failed!" + exit 1 + fi + + - name: Comment on PR if build fails + if: failure() + uses: actions/github-script@v7 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: '❌ Mintlify documentation build failed. Please check the build logs for details.' + }) \ No newline at end of file