Print a warning if Gemfile's dependencies are not satisfied

This commit is contained in:
なつき
2022-12-21 17:16:23 -08:00
committed by GitHub
parent 8181fc031a
commit 1e9bc18f8e
+5
View File
@@ -13,6 +13,11 @@ DESTINATION_DIRECTORY=${GITHUB_WORKSPACE}/$INPUT_DESTINATION
PAGES_GEM_HOME=$BUNDLE_APP_CONFIG
GITHUB_PAGES=$PAGES_GEM_HOME/bin/github-pages
# 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" >/dev/null 2>&1; 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