mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 13:44:15 +00:00
Allow the Pull Request to trigger a build.
This commit is contained in:
28
_scripts/travis/cibuild.sh
Normal file
28
_scripts/travis/cibuild.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Travis CI build jobs.
|
||||
#
|
||||
# © 2019 Cotes Chung
|
||||
# Published under MIT License
|
||||
|
||||
if [[ $TRAVIS_PULL_REQUEST = "false" ]]; then # triggered by author
|
||||
|
||||
BUILDER=../blog-builder
|
||||
|
||||
git clone https://${GH_TOKEN}@github.com/cotes2020/blog-builder.git \
|
||||
$BUILDER --depth=1 -q
|
||||
|
||||
cp -r $BUILDER/framework/* .
|
||||
bash _cibuild.sh
|
||||
|
||||
else # triggered by Pull Request
|
||||
|
||||
bundle install --path vendor/bundle --quiet
|
||||
python _scripts/py/init_all.py
|
||||
|
||||
build_cmd="JEKYLL_ENV=production bundle exec jekyll build"
|
||||
|
||||
echo "\$ $build_cmd"
|
||||
eval $build_cmd
|
||||
|
||||
fi
|
||||
Reference in New Issue
Block a user