Skip to content

Commit 55e2a5f

Browse files
author
k9ert
authored
Chore: Making netlify more robust (#1953)
* Chore: netlify issues * prepare mkdocs-wrapper for different exec * adjust site dir
1 parent de8f5af commit 55e2a5f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

utils/mkdocs-wrapper.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#!/bin/bash
22

3+
# netlify is configured to use the utils-directory as base directory
4+
# This prevents that it's using the requirements-txt and a lot of issues
5+
# So in order to make the script work the exact same in both cases,
6+
# we first change the directory one up, no matter from where this script
7+
# has been executed from.
8+
cd "$( dirname "${BASH_SOURCE[0]}" )/.."
39

410
echo " --> Starting mkdocs-wrapper.sh"
511

@@ -39,5 +45,9 @@ echo " --> now running mkdocs $1 $2"
3945

4046
mkdocs $1 $2
4147

48+
# As netlify expects the site-dir in its basedir (./utils, see above) we need
49+
# to mv it
50+
mv site ./utils/site
51+
4252
# Potentially, we could rollback here the changes but that would be anoying if you want
4353
# to edit files.

0 commit comments

Comments
 (0)