Skip to content

Commit

Permalink
Using make build within all build scripts and commenting Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
benji-glitsos-ga committed Nov 27, 2024
1 parent e82ff31 commit e6b761a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
20 changes: 12 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# This is the script for building the site locally on Mac or Linux. In the terminal, enter the command:
# make
# Build and run commands

run:
make build
make start
run-local: # To run the site on your local computer (on Mac or Linux), use the command 'make'.
make build-local
make start-local

build:
build-local: # This builds a local Docker container which runs 'make build' internally.
docker build -t dea-knowledge-hub .

rebuild:
rebuild-local:
docker build --no-cache -t dea-knowledge-hub .

start:
start-local:
docker run -it --rm --name dea-knowledge-hub --publish 8062:8062 --volume ./docs/notebooks:/docs/notebooks --volume ./output:/output --env-file .env dea-knowledge-hub \
| grep --invert-match --regexp "WARNING.*Document headings start at" \
| grep --invert-match --regexp "WARNING.*duplicate label" \
Expand All @@ -20,6 +19,11 @@ start:
| grep --invert-match --regexp ".*GET /_files.*" \
| grep --invert-match --regexp ".*GET /_images.*"

build:
sphinx-build -b dirhtml -j auto -a /docs /output

# Other commands

ssh:
docker exec -it dea-knowledge-hub /bin/sh

Expand Down
2 changes: 1 addition & 1 deletion build-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sass --style=expanded /docs/_static/styles/index.scss /docs/_static/styles/style

cp /docs/_robots/robots-local.txt /docs/robots.txt

sphinx-build -b dirhtml -j auto -a /docs /output
make build

cd /output
python -m http.server 8062
2 changes: 1 addition & 1 deletion build-pr-preview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ sass --style=compressed ./docs/_static/styles/index.scss ./docs/_static/styles/s

cp ./docs/_robots/robots-demo.txt ./docs/robots.txt

sphinx-build -b dirhtml -j auto -a ./docs ./output
make build
2 changes: 1 addition & 1 deletion build-production.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ sass --style=compressed ./docs/_static/styles/index.scss ./docs/_static/styles/s

cp ./docs/_robots/robots-production.txt ./docs/robots.txt

sphinx-build -b dirhtml -j auto -a ./docs ./output
make build

0 comments on commit e6b761a

Please sign in to comment.