Update 2024.11.18 15:52 CET
This commit is contained in:
parent
a8bbe0446c
commit
0144747f56
1 changed files with 5 additions and 1 deletions
|
@ -19,23 +19,27 @@ echo `pwd`
|
|||
echo "post-receive: Generating https://bajsicki.com with Hugo..."
|
||||
|
||||
# Create the directory and all subdirectories if they don't exist.
|
||||
echo "post-receive: Creating directory and subdirs if they don't exist."
|
||||
mkdir -p $GIT_WORK_TREE
|
||||
chmod 755 $GIT_WORK_TREE
|
||||
|
||||
# Remove any files already in the public directory, a fresh copy will be generated by hugo
|
||||
echo "post-receive: Cleaning the /public directory."
|
||||
rm -rf $GIT_WORK_TREE/public
|
||||
# Update the modules in case of changes and pull the new pages
|
||||
echo "post-receive: pulling git repo and submodules"
|
||||
cd $GIT_WORK_TREE && git pull --recurse-submodules
|
||||
|
||||
# Generate the site with hugo
|
||||
echo "post-receive: running hugo"
|
||||
cd $GIT_WORK_TREE && hugo
|
||||
|
||||
|
||||
# Fix any permission problems.
|
||||
echo "post-receive: fixing permissions"
|
||||
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 deployment complete"
|
||||
|
||||
#+end_src
|
||||
|
||||
|
|
Loading…
Reference in a new issue