diff --git a/README.org b/README.org index d9c57f9..db0a7cf 100644 --- a/README.org +++ b/README.org @@ -13,7 +13,7 @@ The post-receive hook is like so: #+begin_src sh #!/bin/bash # Directory on the server where the website will be mapped. -export GIT_WORK_TREE=/srv/bajsicki.com +export GIT_WORK_TREE=/srv/bajsicki.com/ echo `pwd` echo "post-receive: Generating https://bajsicki.com with Hugo..." @@ -24,27 +24,18 @@ chmod 755 $GIT_WORK_TREE # Remove any files already in the public directory, a fresh copy will be generated by hugo rm -rf $GIT_WORK_TREE/public +# Update the modules in case of changes and pull the new pages +cd $GIT_WORK_TREE && git pull --recurse-submodules # Generate the site with hugo -cd $GIT_WORK_TREE && chmod +x update.sh -cd $GIT_WORK_TREE && ./update.sh +cd $GIT_WORK_TREE && hugo + # Fix any permission problems. find $GIT_WORK_TREE/public -type f -print | xargs -d '\n' chmod 644 find $GIT_WORK_TREE/public -type d -print | xargs -d '\n' chmod 755 -echo "post-receive: Hugo site generation complete" -#+end_src - -The ~update.sh~ script is as dead simple as things get. - -#+begin_src sh -#!/usr/bin/env sh - -cd themes/hugo-tufte/ -git reset --hard && git pull origin main -f -cd ../.. -git reset --hard && git pull origin main -f -hugo +echo "post-receive: Hugo site deployment complete" #+end_src + diff --git a/update.sh b/update.sh deleted file mode 100755 index 2e33567..0000000 --- a/update.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env sh - -cd themes/hugo-tufte/ -git reset --hard && git pull origin main -f -cd ../.. -git reset --hard && git pull origin main -f -hugo