Chore: Making netlify more robust (#1953)

* Chore: netlify issues
* prepare mkdocs-wrapper for different exec
* adjust site dir
This commit is contained in:
k9ert 2022-11-02 16:47:51 +01:00 committed by GitHub
parent de8f5af619
commit 55e2a5fb76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,11 @@
#!/bin/bash #!/bin/bash
# netlify is configured to use the utils-directory as base directory
# This prevents that it's using the requirements-txt and a lot of issues
# So in order to make the script work the exact same in both cases,
# we first change the directory one up, no matter from where this script
# has been executed from.
cd "$( dirname "${BASH_SOURCE[0]}" )/.."
echo " --> Starting mkdocs-wrapper.sh" echo " --> Starting mkdocs-wrapper.sh"
@ -39,5 +45,9 @@ echo " --> now running mkdocs $1 $2"
mkdocs $1 $2 mkdocs $1 $2
# As netlify expects the site-dir in its basedir (./utils, see above) we need
# to mv it
mv site ./utils/site
# Potentially, we could rollback here the changes but that would be anoying if you want # Potentially, we could rollback here the changes but that would be anoying if you want
# to edit files. # to edit files.