Skip to content

Commit

Permalink
Update documentation build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
MostlyKIGuess committed Jan 20, 2025
1 parent bd9616e commit dafa504
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
sudo apt install -y build-essential sudo git wget curl python3-sphinx rsync
# install sugar-toolkit-gtk3 dependencies
sudo apt install -y python-all-dev python3-all-dev libgtk-3-dev
sudo apt install -y python-dev-is-python3 python3-dev libgtk-3-dev
sudo apt install -y libgdk-pixbuf2.0-dev libsm-dev libice-dev librsvg2-dev
sudo apt install -y libxfixes-dev libxi-dev libx11-dev gettext intltool
sudo apt install -y libxml-parser-perl x11proto-core-dev libasound2-dev
Expand Down
3 changes: 2 additions & 1 deletion ci/docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ sudo make

# make documentation
show-green "Building documentation"
sphinx-build -b html doc doc/_build/html
./make-doc.sh
mkdir deploy
mkdir -p deploy
cp -r doc/_build/html deploy/sugar3
touch deploy/.nojekyll
# create an index.html so that users don't become confused
Expand Down
8 changes: 4 additions & 4 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS)
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

Expand Down Expand Up @@ -52,9 +52,9 @@ clean:
rm -rf $(BUILDDIR)/*

html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
Expand Down
11 changes: 11 additions & 0 deletions make-doc.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
#!/bin/sh
set -e

if [ ! -d "src" ]; then
echo "Error: ../src directory does not exist."
exit 1
fi

if [ ! -d "doc" ]; then
echo "Error: doc directory does not exist."
exit 1
fi

sphinx-apidoc --force --separate --output-dir=doc src
make -C doc html

0 comments on commit dafa504

Please sign in to comment.