diff --git a/web/landingpage/build.sh b/web/landingpage/build.sh deleted file mode 100755 index 0b42475..0000000 --- a/web/landingpage/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -bundle exec jekyll build production \ No newline at end of file diff --git a/web/landingpage/deploy.sh b/web/landingpage/deploy.sh new file mode 100755 index 0000000..3b22e13 --- /dev/null +++ b/web/landingpage/deploy.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +directory=_site +branch=gh-pages +build_command() { + bundle exec jekyll build +} + +echo -e "\033[0;32mDeleting old content...\033[0m" +rm -rf $directory + +echo -e "\033[0;32mChecking out $branch....\033[0m" +git worktree add $directory $branch + +echo -e "\033[0;32mGenerating site...\033[0m" +build_command + +echo -e "\033[0;32mDeploying $branch branch...\033[0m" +cd $directory && + git pull origin $branch + git add --all && + git commit -m "Deploy updates" && + git push origin $branch + +echo -e "\033[0;32mCleaning up...\033[0m" +git worktree remove $directory \ No newline at end of file