-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scripts:docs_setup: Sets the docs development and building env up
- Loading branch information
Showing
4 changed files
with
52 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,5 +32,7 @@ if [ -f .env ]; then | |
source .env | ||
fi | ||
|
||
./scripts/docs_setup.sh "$@" | ||
|
||
## and go back | ||
cd "$cwd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
set -e #ux | ||
|
||
## Record directory we are called from | ||
cwd="$(pwd)" | ||
## Change to project directory | ||
cd "$(dirname "$0")/.." | ||
if [ -f .env ]; then | ||
# shellcheck source="../.env" disable=SC1091 | ||
source .env | ||
fi | ||
|
||
# shellcheck disable=SC2143 | ||
if [[ ! $(pip -V) =~ .*\.venv.* ]]; then | ||
echo "-- Activate Python virtual environment" | ||
# shellcheck source="../.venv/bin/activate" | ||
source .venv/bin/activate | ||
fi | ||
|
||
echo "-- Install Python requirements for docs in venv" | ||
pip install -r docs/requirements.in | ||
|
||
echo "-- Install Playwright browser dependency for PDF export" | ||
playwright install firefox #chromium | ||
|
||
## and go back | ||
cd "$cwd" |