mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-08-29 04:26:20 +00:00
69 lines
1.4 KiB
YAML
69 lines
1.4 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:
|
|
validate:
|
|
name: Validate Documentation
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '20'
|
|
- run: python docs_check.py
|
|
|
|
deploy:
|
|
name: Build and Deploy to GitHub Pages
|
|
if: github.event_name != 'pull_request'
|
|
runs-on: ubuntu-latest
|
|
needs: validate
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Export static site
|
|
run: |
|
|
cd docs
|
|
npx mintlify export --output ../export.zip
|
|
cd ..
|
|
unzip -q export.zip -d site
|
|
|
|
- uses: actions/configure-pages@v6
|
|
|
|
- uses: actions/upload-pages-artifact@v5
|
|
with:
|
|
path: ./site
|
|
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v5
|