Skip to content

Commit 29a584b

Browse files
committed
updated workflows and netlify.toml file
1 parent 2c45f6d commit 29a584b

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.github/workflows/build-gh-pages.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,9 @@ jobs:
1818
with:
1919
python-version: 3.13
2020

21-
- name: Install dependencies
22-
run: |
23-
pip install -r requirements.txt
24-
2521
- name: Build the book
2622
run: |
27-
rm -rf DISCOVER/_tags/*
28-
sphinx-build -b html DISCOVER/ DISCOVER/_build/html
23+
bash ci/build_website.sh
2924
3025
- name: Push book HTML to gh-pages
3126
uses: peaceiris/[email protected]

ci/build.sh renamed to ci/build_website.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,14 @@ rm -rf DISCOVER/_tags/*
1010
echo "Building English version..."
1111
sphinx-build -b html DISCOVER/ DISCOVER/_build/html
1212

13+
14+
# Copy root level files if they exist
15+
if [ -f "DISCOVER/_static/404.html" ]; then
16+
cp DISCOVER/_static/404.html DISCOVER/_build/html/
17+
fi
18+
19+
if [ -f "DISCOVER/_static/index.html" ]; then
20+
cp DISCOVER/_static/index.html DISCOVER/_build/html/
21+
fi
22+
1323
echo "Build completed successfully"

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build]
22
publish = "DISCOVER/_build/html"
3-
command = "pip install -r requirements.txt && rm -rf DISCOVER/_tags/* && sphinx-build -b html DISCOVER/ DISCOVER/_build/html"
3+
command = "bash ci/build_website.sh"
44

55
[build.environment]
66
PYTHON_VERSION = "3.12"

0 commit comments

Comments
 (0)