Swap to vivi build action
This commit is contained in:
@@ -1,45 +1,16 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
####################################################################################################
|
||||
#
|
||||
# Calls github-pages executable to build the site using allowed plugins and supported configuration
|
||||
#
|
||||
####################################################################################################
|
||||
# Set verbose mode
|
||||
set -x
|
||||
|
||||
echo "Hello, I'm the jekyll build pages entrypoint"
|
||||
# Stop executing after error
|
||||
set -e
|
||||
|
||||
set -o errexit
|
||||
# Change permissions
|
||||
chmod -R a+w /github/workspace
|
||||
|
||||
SOURCE_DIRECTORY=${GITHUB_WORKSPACE}/$INPUT_SOURCE
|
||||
DESTINATION_DIRECTORY=${GITHUB_WORKSPACE}/$INPUT_DESTINATION
|
||||
PAGES_GEM_HOME=$BUNDLE_APP_CONFIG
|
||||
GITHUB_PAGES_BIN=$PAGES_GEM_HOME/bin/github-pages
|
||||
# Use working directory
|
||||
cd /github/workspace
|
||||
|
||||
# Check if Gemfile's dependencies are satisfied or print a warning
|
||||
if test -e "$SOURCE_DIRECTORY/Gemfile" && ! bundle check --dry-run --gemfile "$SOURCE_DIRECTORY/Gemfile"; then
|
||||
echo "::warning:: github-pages can't satisfy your Gemfile's dependencies."
|
||||
fi
|
||||
|
||||
# Set environment variables required by supported plugins
|
||||
export JEKYLL_ENV="production"
|
||||
export JEKYLL_GITHUB_TOKEN=$INPUT_TOKEN
|
||||
export PAGES_REPO_NWO=$GITHUB_REPOSITORY
|
||||
export JEKYLL_BUILD_REVISION=$INPUT_BUILD_REVISION
|
||||
export PAGES_API_URL=$GITHUB_API_URL
|
||||
|
||||
# Set verbose flag
|
||||
if [ "$INPUT_VERBOSE" = 'true' ]; then
|
||||
VERBOSE='--verbose'
|
||||
else
|
||||
VERBOSE=''
|
||||
fi
|
||||
|
||||
# Set future flag
|
||||
if [ "$INPUT_FUTURE" = 'true' ]; then
|
||||
FUTURE='--future'
|
||||
else
|
||||
FUTURE=''
|
||||
fi
|
||||
|
||||
cd "$PAGES_GEM_HOME"
|
||||
$GITHUB_PAGES_BIN build "$VERBOSE" "$FUTURE" --source "$SOURCE_DIRECTORY" --destination "$DESTINATION_DIRECTORY"
|
||||
# Run command
|
||||
$*
|
||||
|
||||
Reference in New Issue
Block a user