Files
semantica/.github/workflows/docs.yml
T
KaifAhmad1 cf802cffe9 ci(docs): restore GitHub Pages deployment using mint export instead of mkdocs
- Validate docs structure with docs_check.py (Python)
- Validate Mintlify build with mint validate (Node 20 LTS)
- Export static site with mint export, deploy to GitHub Pages
- Deploy job skipped on PRs (validate-only for branches)
2026-05-22 23:45:11 +05:30

80 lines
1.7 KiB
YAML

name: Build and Deploy Documentation
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'docs_check.py'
- 'CHANGELOG.md'
- 'RELEASE.md'
pull_request:
branches: [main]
paths:
- 'docs/**'
- 'docs_check.py'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Validate docs structure
run: python docs_check.py
- name: Validate Mintlify build
run: cd docs && npx mintlify validate
- name: Export static site
run: |
cd docs
npx mintlify export --output ../export.zip
cd ..
unzip -q export.zip -d site
- name: Setup Pages
if: github.event_name != 'pull_request'
uses: actions/configure-pages@v6
- name: Upload artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v5
with:
path: ./site
deploy:
name: Deploy to GitHub Pages
if: github.event_name != 'pull_request'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5