Interactive Wizard #49
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
- name: Install Mintlify | |
run: npm install -g mintlify | |
- name: Test documentation | |
run: | | |
cd docs | |
# If mintlify dev has errors, it will exit with status 1 | |
# If it starts successfully, kill it after 5 seconds | |
timeout 5s mintlify dev || exit_status=$? | |
if [ $exit_status -eq 124 ]; then | |
# timeout exit code 124 means the process was killed after starting successfully | |
echo "Documentation built successfully!" | |
exit 0 | |
else | |
echo "Documentation failed to build! Try running `mintlify dev` from the docs dir locally" | |
exit 1 | |
fi |