Skip to content

Commit 1aee5df

Browse files
authored
Merge pull request #349 from AR21SM/netlify_setup
Netlify Setup for PR Deploy Previews
2 parents 2818a6c + 29a584b commit 1aee5df

File tree

4 files changed

+30
-53
lines changed

4 files changed

+30
-53
lines changed

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

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

21-
- name: Install dependencies
22-
run: |
23-
pip install jupyter-book
24-
pip install sphinx-tags
25-
2621
- name: Build the book
2722
run: |
28-
rm -rf DISCOVER/_tags/*
29-
sphinx-build -b html DISCOVER/ DISCOVER/_build/html
23+
bash ci/build_website.sh
3024
3125
- name: Push book HTML to gh-pages
3226
uses: peaceiris/[email protected]

.github/workflows/preview.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

ci/build_website.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
echo "Starting build process..."
3+
4+
# Install dependencies
5+
pip install -r requirements.txt
6+
7+
# Clean tags directory
8+
rm -rf DISCOVER/_tags/*
9+
10+
echo "Building English version..."
11+
sphinx-build -b html DISCOVER/ DISCOVER/_build/html
12+
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+
23+
echo "Build completed successfully"

netlify.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[build]
2+
publish = "DISCOVER/_build/html"
3+
command = "bash ci/build_website.sh"
4+
5+
[build.environment]
6+
PYTHON_VERSION = "3.12"

0 commit comments

Comments
 (0)