Skip to content

Commit

Permalink
Fully customize the build process of the ReadTheDocs (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman authored Aug 19, 2023
1 parent 467cfe8 commit 61732b7
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,10 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
golang: "1.19" # needed by hugo
jobs:
post_build:
# remove the HTML built by Sphinx
- rm -rvf _readthedocs/html
# Install hugo and build the website
- wget https://github.com/gohugoio/hugo/releases/download/v0.98.0/hugo_extended_0.98.0_Linux-64bit.tar.gz
- tar -xvf hugo_extended_0.98.0_Linux-64bit.tar.gz
- sed -i "s#https://seismo-learn.org/#${READTHEDOCS_CANONICAL_URL}#" config/_default/config.yaml
- ./hugo
- mv public _readthedocs/html
commands:
# Full cusotmized build process
# https://docs.readthedocs.io/en/stable/build-customization.html#override-the-build-process
- curl -sSL https://github.com/gohugoio/hugo/releases/download/v0.117.0/hugo_extended_0.117.0_Linux-64bit.tar.gz | tar zxvf - hugo
- sed -i "s#https://seismo-learn.org/#${READTHEDOCS_CANONICAL_URL}#" config/_default/config.yaml
- ./hugo -d $READTHEDOCS_OUTPUT/html/

0 comments on commit 61732b7

Please sign in to comment.