Files

38 lines
1.1 KiB
Bash
Raw Permalink Normal View History

2021-12-14 11:25:38 -05:00
#!/bin/bash
#######################################################################################################
2021-12-17 17:43:47 -05:00
#
2021-12-14 11:25:38 -05:00
# Calls github-pages executable to build the site using whitelisted plugins and supported configuration
#
#######################################################################################################
set -o errexit
SOURCE_DIRECTORY=${GITHUB_WORKSPACE}/$INPUT_SOURCE
DESTINATION_DIRECTORY=${GITHUB_WORKSPACE}/$INPUT_DESTINATION
PAGES_GEM_HOME=$BUNDLE_APP_CONFIG
GITHUB_PAGES=$PAGES_GEM_HOME/bin/github-pages
# Set environment variables required by supported plugins
export JEKYLL_ENV="production"
export JEKYLL_GITHUB_TOKEN=$INPUT_TOKEN
export PAGES_REPO_NWO=$GITHUB_REPOSITORY
2022-01-06 13:17:41 -08:00
export JEKYLL_BUILD_REVISION=$INPUT_BUILD_REVISION
2021-12-14 11:25:38 -05:00
2021-12-27 14:45:57 -08:00
# Set verbose flag
if [ "$INPUT_VERBOSE" = 'true' ]; then
2021-12-14 11:25:38 -05:00
VERBOSE='--verbose'
else
VERBOSE=''
2021-12-14 11:25:38 -05:00
fi
2021-12-27 14:45:57 -08:00
# Set future flag
if [ "$INPUT_FUTURE" = 'true' ]; then
2021-12-27 14:45:57 -08:00
FUTURE='--future'
else
FUTURE=''
2021-12-27 14:45:57 -08:00
fi
2021-12-14 11:25:38 -05:00
2021-12-27 14:45:57 -08:00
cd "$PAGES_GEM_HOME"
2021-12-27 15:27:23 -08:00
$GITHUB_PAGES build "$VERBOSE" "$FUTURE" --source "$SOURCE_DIRECTORY" --destination "$DESTINATION_DIRECTORY"