Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions .github/workflows/deploy-api-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ on:
branches:
- main
paths:
- 'packages/ducrs/Cargo.toml'
- 'packages/ducpy/docs/**'
- 'packages/ducpy/src/ducpy/**'
- 'packages/ducjs/src/**'
- 'packages/ducrs/src/**'
- 'packages/ducpdf/src/**'
- 'packages/ducsvg/src/**'
- 'packages/ducjs/typedoc.json'
- 'packages/ducpdf/typedoc.json'
- 'packages/ducsvg/typedoc.json'
- 'apps/web/content/docs/**'
- 'schema/**'
- 'scripts/gen-sql-docs.py'
- 'scripts/build-all-api-docs.py'
- '**.md'
- '**.mdx'

Expand Down Expand Up @@ -68,13 +68,7 @@ jobs:
sudo rm -rf /tmp/sq* /tmp/go-graphviz* /tmp/wazero*

- name: Build SQL HTML Documentation
run: |
TAG_VERSION=$(git tag -l 'duc.sql@*' -l 'ducsql@*' -l 'duc@*' | sed -E 's/(duc\.sql@|ducsql@|duc@)//' | sort -V | tail -n1)
if [ -z "$TAG_VERSION" ]; then
TAG_VERSION=$(node -p "require('./package.json').version")
fi
echo "Resolved SQL version: $TAG_VERSION"
SQL_DOCS_VERSION="$TAG_VERSION" uv run python3 scripts/gen-sql-docs.py
run: uv run python3 scripts/gen-sql-docs.py

- name: Install Python dependencies with uv
run: uv sync --frozen || uv sync
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/deploy-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ on:
workflow_dispatch:
repository_dispatch:
types: [trigger-web-deployment]
push:
branches:
- main
paths:
- 'apps/web/**'
- 'package.json'
- 'bun.lock'

jobs:
check-deploy-conditions:
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ jobs:
test-docs:
name: API Docs Staging Dry-Run
needs: release-check
if: needs.release-check.outputs.any_release == 'true'
uses: ./.github/workflows/deploy-api-docs.yml
with:
dry_run: true
Expand Down Expand Up @@ -405,22 +404,22 @@ jobs:
echo "### ❌ Package tests failed" >> "$GITHUB_STEP_SUMMARY"
FAILED="true"
fi

if [ "$DOCS_RESULT" = "success" ]; then
echo "### ✅ API Documentation staging dry-run passed" >> "$GITHUB_STEP_SUMMARY"
elif [ "$DOCS_RESULT" = "skipped" ]; then
echo "### ⏭️ API Documentation dry-run was skipped" >> "$GITHUB_STEP_SUMMARY"
elif [ "$DOCS_RESULT" = "cancelled" ]; then
echo "### 🛑 API Documentation dry-run cancelled (interrupted by workflow failure)" >> "$GITHUB_STEP_SUMMARY"
FAILED="true"
else
echo "### ❌ API Documentation staging dry-run failed" >> "$GITHUB_STEP_SUMMARY"
FAILED="true"
fi
else
echo "### ℹ️ No pending package releases — package tests skipped" >> "$GITHUB_STEP_SUMMARY"
fi

if [ "$DOCS_RESULT" = "success" ]; then
echo "### ✅ API Documentation staging dry-run passed" >> "$GITHUB_STEP_SUMMARY"
elif [ "$DOCS_RESULT" = "skipped" ]; then
echo "### ⏭️ API Documentation dry-run was skipped" >> "$GITHUB_STEP_SUMMARY"
elif [ "$DOCS_RESULT" = "cancelled" ]; then
echo "### 🛑 API Documentation dry-run cancelled (interrupted by workflow failure)" >> "$GITHUB_STEP_SUMMARY"
FAILED="true"
else
echo "### ❌ API Documentation staging dry-run failed" >> "$GITHUB_STEP_SUMMARY"
FAILED="true"
fi

if [ "$FAILED" = "true" ]; then
exit 1
fi
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release-duc2pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,9 @@ jobs:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
working-directory: ./packages/ducpdf/src/duc2pdf
run: npx semantic-release ${{ steps.setup-release-environment.outputs.release-mode }}

- name: Deploy API documentation
uses: peter-evans/repository-dispatch@v3
with:
event-type: trigger-api-docs-deployment
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions apps/web/app/(home)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default function HomePage() {
width={1400}
height={788}
priority
unoptimized
className="mx-auto w-full md:w-auto rounded-xl object-contain md:h-[500px]"
/>
</Link>
Expand Down
3 changes: 3 additions & 0 deletions apps/web/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const config = {
turbopack: {
root: path.resolve(import.meta.dirname, '../../'),
},
images: {
unoptimized: true,
},
async rewrites() {
return [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/ducpy/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"sphinx_llm",
"sphinx_llm.txt",
]

templates_path = ['_templates']
Expand Down
6 changes: 1 addition & 5 deletions scripts/build-all-api-docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@ def main():
# Step 0. SQL API Docs (sq inspect -> /reference/sql/)
print("\n--> Step 0: SQL API Docs (gen-sql-docs.py)")
gen_sql_script = repo_root / "scripts" / "gen-sql-docs.py"
sql_ver = get_latest_tag_version(repo_root, "duc.sql@*") or get_latest_tag_version(repo_root, "duc@*") or "1.0.0"
print(f" Resolved SQL version: {sql_ver}")
env = os.environ.copy()
env["SQL_DOCS_VERSION"] = sql_ver
subprocess.run([sys.executable, str(gen_sql_script)], cwd=repo_root, env=env, check=True)
subprocess.run([sys.executable, str(gen_sql_script)], cwd=repo_root, check=True)

# Step 1. Python API Docs (Sphinx -> /reference/python/)
print("\n--> Step 1: Python API Docs (Sphinx)")
Expand Down
6 changes: 3 additions & 3 deletions scripts/gen-sql-docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ def main():
check=True
)

version = os.environ.get("SQL_DOCS_VERSION", "").strip()
version = pragma_version_str
if len(sys.argv) > 1 and sys.argv[1]:
version = sys.argv[1].strip()
if not version and pragma_version_str:
version = pragma_version_str
elif not version and os.environ.get("SQL_DOCS_VERSION", "").strip():
version = os.environ.get("SQL_DOCS_VERSION").strip()

if version and out_file.exists():
content = out_file.read_text(encoding="utf-8")
Expand Down
Loading