feat: use improved watcher/rebuilder script

Please see [1] for the discussion and [2] for the code review.

[1] https://discussion.fedoraproject.org/t/improved-build-script-for-doc-repos-with-change-detection/40920/10
[2] https://pagure.io/neuro-sig/documentation/pull-request/23
This commit is contained in:
Ankur Sinha (Ankur Sinha Gmail) 2022-09-16 12:47:15 +01:00
parent 8edc5dad21
commit 804073fd10
No known key found for this signature in database
GPG key ID: F8D8C0BEBAC898BD
3 changed files with 222 additions and 68 deletions

View file

@ -1,18 +1,3 @@
#!/bin/sh
#!/bin/bash
if [ "$(uname)" = "Darwin" ]; then
# Running on macOS.
# Let's assume that the user has the Docker CE installed
# which doesn't require a root password.
echo "The preview will be available at http://localhost:8080/"
docker run --rm -v "$(pwd):/antora:ro" -v "$(pwd)/nginx.conf:/etc/nginx/conf.d/default.conf:ro" -p 8080:80 nginx
elif [ "$(expr substr "$(uname -s)" 1 5)" = "Linux" ]; then
# Running on Linux.
# Fedora Workstation has python3 installed as a default, so using that
echo ""
echo "The preview is available at http://localhost:8080"
echo ""
cd ./public
python3 -m http.server 8080
fi
echo "Deprecated. Use the builder.sh script instead"