2019-10-19 04:35:26 +03:00
|
|
|
#!/bin/sh
|
|
|
|
echo '👍 INSTALLING THE GEM BUNDLE'
|
|
|
|
bundle install
|
|
|
|
bundle list | grep "jekyll ("
|
2019-10-23 04:45:08 +03:00
|
|
|
|
2019-10-19 04:35:26 +03:00
|
|
|
echo '👍 BUILDING THE SITE'
|
2019-10-22 04:02:01 +03:00
|
|
|
echo "Jekyll env = ${JEKYLL_ENV}"
|
2019-10-22 03:57:23 +03:00
|
|
|
bundle exec jekyll build
|
2019-10-23 04:45:08 +03:00
|
|
|
|
2019-10-19 04:35:26 +03:00
|
|
|
echo '👍 PUSHING IT BACK TO GITHUB-PAGES'
|
2019-10-19 23:35:34 +03:00
|
|
|
cd _site
|
2019-10-23 05:25:32 +03:00
|
|
|
remote_repo="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
|
|
|
remote_branch="gh-pages"
|
|
|
|
|
|
|
|
git init
|
|
|
|
git config user.name "${GITHUB_ACTOR}"
|
|
|
|
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
|
|
|
git add .
|
|
|
|
git commit -m "Automated deployment triggered by ${GITHUB_SHA}"
|
2019-10-23 05:43:55 +03:00
|
|
|
#git remote add origin "${remote_repo}"
|
2019-10-23 06:03:46 +03:00
|
|
|
git push --force $remote_repo master:$remote_branch
|
2019-10-23 05:25:32 +03:00
|
|
|
rm -fr .git
|
2019-10-19 04:35:26 +03:00
|
|
|
cd ../
|
2019-10-23 05:12:07 +03:00
|
|
|
|
2019-10-19 04:35:26 +03:00
|
|
|
echo '👍 GREAT SUCCESS!'
|
2019-10-23 05:12:07 +03:00
|
|
|
|
|
|
|
# Examples:
|
|
|
|
# - https://github.com/JamesIves/github-pages-deploy-action/blob/master/entrypoint.sh
|
|
|
|
# - https://github.com/maxheld83/ghpages/blob/master/entrypoint.sh
|
|
|
|
# -
|