Skip to content

Commit

Permalink
configure rtd with build commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ewdurbin committed Feb 8, 2023
1 parent f2462c5 commit f1eed7d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
18 changes: 18 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,25 @@
# Required
version: 2

python:
install:
- requirements: requirements/docs.txt
- requirements: requirements/user-docs.txt

build:
os: ubuntu-22.04
tools:
python: "3.11"
commands:
- |
if [ "$READTHEDOCS_PROJECT" = "warehouse" ] ;
then
make -C docs/ html;
mv docs/_build/html _readthedocs/html;
fi
- |
if [ "$READTHEDOCS_PROJECT" = "docspypiorg" ] ;
then
mkdocs build -f user-docs/mkdocs.yml
mv user-docs/site _readthedocs/html;
fi
2 changes: 1 addition & 1 deletion bin/user-docs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export LANG="${ENCODING:-en_US.UTF-8}"
# Print all the following commands
set -x

mkdocs build -f mkdocs.yml
mkdocs build -f user-docs/mkdocs.yml
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,8 @@ services:
context: .
args:
DEVEL: "yes"
command: mkdocs serve -a 0.0.0.0:8000 -f mkdocs.yml
command: mkdocs serve -a 0.0.0.0:8000 -f user-docs/mkdocs.yml
volumes:
- ./mkdocs.yml:/opt/warehouse/src/mkdocs.yml:z
- ./user-docs:/opt/warehouse/src/user-docs:z
ports:
- "10000:8000"
2 changes: 1 addition & 1 deletion mkdocs.yml → user-docs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
site_name: PyPI Docs
docs_dir: user-docs
docs_dir: .
theme:
name: material
logo: assets/logo.png
Expand Down

0 comments on commit f1eed7d

Please sign in to comment.