Add --future support and + add a shellcheck

This commit is contained in:
Yoann Chaudet
2021-12-27 14:49:16 -08:00
parent 6379b9899d
commit 64126f93b1
4 changed files with 37 additions and 5 deletions
+21
View File
@@ -0,0 +1,21 @@
name: 'ShellCheck'
on:
pull_request:
paths:
- '**.sh'
jobs:
shellcheck:
runs-on: ubuntu-latest
env:
SHELLCHECK_OPTS: -s bash
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Run ShellCheck
uses: ludeeus/[email protected]
with:
version: v0.8.0
format: tty
+1 -1
View File
@@ -5,7 +5,7 @@ source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
# Manage our dependency on the version of the github-pages gem here.
gem "github-pages", "= 222"
gem "github-pages", "= 223"
# Explicitly include this gem here.
# It is not directly included in the github-pages gem list of dependencies,
+5 -1
View File
@@ -1,3 +1,4 @@
# Generated from action.yml.erb
# <%= nonce %>
name: 'Pages Jekyll'
description: 'A simple GitHub Action for producing Jekyll build artifacts compatible with GitHub Pages'
@@ -10,6 +11,10 @@ inputs:
description: 'Output directory of the build. Although it can be nested inside the source, it cannot be the same as the source directory.'
required: false
default: ./_site
future:
description: 'Publishes posts with a future date.'
required: false
default: true
verbose:
description: 'Verbose output'
required: false
@@ -21,4 +26,3 @@ inputs:
runs:
using: 'docker'
image: '<%= pages_action_url %>'
+10 -3
View File
@@ -18,12 +18,19 @@ export JEKYLL_ENV="production"
export JEKYLL_GITHUB_TOKEN=$INPUT_TOKEN
export PAGES_REPO_NWO=$GITHUB_REPOSITORY
if [ -z $INPUT_VERBOSE ]; then
# Set verbose flag
if [ -z "$INPUT_VERBOSE" ]; then
VERBOSE=''
else
VERBOSE='--verbose'
fi
cd $PAGES_GEM_HOME
# Set future flag
if [ -z "$INPUT_FUTURE" ]; then
FUTURE=''
else
FUTURE='--future'
fi
$GITHUB_PAGES build $VERBOSE --source $SOURCE_DIRECTORY --destination $DESTINATION_DIRECTORY
cd "$PAGES_GEM_HOME"
$GITHUB_PAGES build $VERBOSE $FUTURE --source "$SOURCE_DIRECTORY" --destination "$DESTINATION_DIRECTORY"