-
Notifications
You must be signed in to change notification settings - Fork 0
/
entrypoint.sh
59 lines (30 loc) · 1.09 KB
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
#######################################################################################################
#
# 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
export JEKYLL_BUILD_REVISION=$INPUT_BUILD_REVISION
# 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 build "$VERBOSE" "$FUTURE" --source "$SOURCE_DIRECTORY" --destination "$DESTINATION_DIRECTORY"