-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild_docs.sh
More file actions
executable file
·45 lines (30 loc) · 1006 Bytes
/
build_docs.sh
File metadata and controls
executable file
·45 lines (30 loc) · 1006 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
set -e
echo "=== 1. Building Projects (Release) ==="
dotnet build Polars.FSharp/Polars.FSharp.fsproj -c Release
echo "=== 2. Generating F# Markdown (Custom Script) ==="
dotnet fsi GenerateFSharpDocs.fsx
echo "=== 3. Organizing Docs ==="
rm -rf docs/api/csharp
rm -rf docs/api/fsharp
rm -rf docs/_site
mkdir -p docs/api/fsharp
cp -r docs/api/fsharp_generated/* docs/api/fsharp/
echo "=== 4. Building Site (DocFX) ==="
docfx metadata docs/docfx.json
docfx build docs/docfx.json
rm -rf docs/api/fsharp_generated
echo "=== 5. Deploying to gh-pages ==="
REPO_URL=$(git config --get remote.origin.url)
if [ -z "$REPO_URL" ]; then
echo "Error: Could not find remote origin URL. Make sure you are in a git repository."
exit 1
fi
cd docs/_site
git init
git checkout -b gh-pages
git add .
git commit -m "docs: auto-deploy updated documentation"
echo "Pushing to $REPO_URL (gh-pages branch)..."
git push -f "$REPO_URL" gh-pages
echo "=== Done! Successfully deployed to gh-pages ==="