Skip to content

Commit 1eedfc2

Browse files
committed
docs(build): add the possibility to push regular files in docs
1 parent 0a5ebe0 commit 1eedfc2

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ jobs:
3636
pip install sphinx sphinx_rtd_theme myst_parser
3737
- name: build docs
3838
run: |
39-
sphinx-build -d html . gh-pages
39+
./build.sh
4040
- name: Setup Pages
4141
uses: actions/configure-pages@v5
4242
- name: Upload artifact
4343
uses: actions/upload-pages-artifact@v3
4444
with:
45-
path: './gh-pages'
45+
path: "./gh-pages"
4646
- name: Deploy to GitHub Pages
4747
id: deployment
4848
uses: actions/deploy-pages@v4

build.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
OUTPUT_DIR=${1:-gh-pages}
6+
7+
# Regular sphinx build
8+
9+
sphinx-build -d html . "$OUTPUT_DIR"
10+
11+
# Copy following files into output directory
12+
13+
INCLUDES_FILES=$(find . -type f | grep '\.gh-include$')
14+
15+
while IFS= read -r file; do
16+
while IFS= read -r include_file; do
17+
dest_file="$OUTPUT_DIR/$(dirname "$file")/$include_file"
18+
mkdir -p "$OUTPUT_DIR/$(dirname "$file")"
19+
cp "$(dirname "$file")/$include_file" "$dest_file"
20+
done < "$file"
21+
done <<< "$INCLUDES_FILES"

cli/docs/.gh-include

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
config.schema.json

engine/.gh-include

Whitespace-only changes.

0 commit comments

Comments
 (0)