Skip to content

Commit

Permalink
Add deploy script for landing page.
Browse files Browse the repository at this point in the history
  • Loading branch information
antranapp committed Dec 10, 2019
1 parent 3807d0b commit b243c1b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
3 changes: 0 additions & 3 deletions web/landingpage/build.sh

This file was deleted.

26 changes: 26 additions & 0 deletions 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

0 comments on commit b243c1b

Please sign in to comment.