Merge pull request #6 from actions/pages/future
Add --future support and + add a shellcheck
This commit is contained in:
@@ -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/action-shellcheck@94e0aab03ca135d11a35e5bfc14e6746dc56e7e9
|
||||||
|
with:
|
||||||
|
version: v0.8.0
|
||||||
|
format: tty
|
||||||
@@ -5,7 +5,7 @@ source "https://rubygems.org"
|
|||||||
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
||||||
|
|
||||||
# Manage our dependency on the version of the github-pages gem here.
|
# 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.
|
# Explicitly include this gem here.
|
||||||
# It is not directly included in the github-pages gem list of dependencies,
|
# It is not directly included in the github-pages gem list of dependencies,
|
||||||
|
|||||||
+7
-3
@@ -1,4 +1,5 @@
|
|||||||
# 2f9877141f775a9030dcf59ab535e186
|
# Generated from action.yml.erb
|
||||||
|
# cc3ed5559aaeabbc7ccc9899f91995ca
|
||||||
name: 'Pages Jekyll'
|
name: 'Pages Jekyll'
|
||||||
description: 'A simple GitHub Action for producing Jekyll build artifacts compatible with GitHub Pages'
|
description: 'A simple GitHub Action for producing Jekyll build artifacts compatible with GitHub Pages'
|
||||||
inputs:
|
inputs:
|
||||||
@@ -10,10 +11,14 @@ inputs:
|
|||||||
description: 'Output directory of the build. Although it can be nested inside the source, it cannot be the same as the source directory.'
|
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
|
required: false
|
||||||
default: ./_site
|
default: ./_site
|
||||||
|
future:
|
||||||
|
description: 'Publishes posts with a future date.'
|
||||||
|
required: false
|
||||||
|
default: true
|
||||||
verbose:
|
verbose:
|
||||||
description: 'Verbose output'
|
description: 'Verbose output'
|
||||||
required: false
|
required: false
|
||||||
default: '1'
|
default: true
|
||||||
token:
|
token:
|
||||||
description: 'GitHub token'
|
description: 'GitHub token'
|
||||||
required: true
|
required: true
|
||||||
@@ -21,4 +26,3 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'docker://ghcr.io/actions/jekyll-build-pages:main'
|
image: 'docker://ghcr.io/actions/jekyll-build-pages:main'
|
||||||
|
|
||||||
|
|||||||
+6
-2
@@ -1,3 +1,4 @@
|
|||||||
|
# Generated from action.yml.erb
|
||||||
# <%= nonce %>
|
# <%= nonce %>
|
||||||
name: 'Pages Jekyll'
|
name: 'Pages Jekyll'
|
||||||
description: 'A simple GitHub Action for producing Jekyll build artifacts compatible with GitHub Pages'
|
description: 'A simple GitHub Action for producing Jekyll build artifacts compatible with GitHub Pages'
|
||||||
@@ -10,10 +11,14 @@ inputs:
|
|||||||
description: 'Output directory of the build. Although it can be nested inside the source, it cannot be the same as the source directory.'
|
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
|
required: false
|
||||||
default: ./_site
|
default: ./_site
|
||||||
|
future:
|
||||||
|
description: 'Publishes posts with a future date.'
|
||||||
|
required: false
|
||||||
|
default: true
|
||||||
verbose:
|
verbose:
|
||||||
description: 'Verbose output'
|
description: 'Verbose output'
|
||||||
required: false
|
required: false
|
||||||
default: '1'
|
default: true
|
||||||
token:
|
token:
|
||||||
description: 'GitHub token'
|
description: 'GitHub token'
|
||||||
required: true
|
required: true
|
||||||
@@ -21,4 +26,3 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: '<%= pages_action_url %>'
|
image: '<%= pages_action_url %>'
|
||||||
|
|
||||||
|
|||||||
+12
-5
@@ -18,12 +18,19 @@ export JEKYLL_ENV="production"
|
|||||||
export JEKYLL_GITHUB_TOKEN=$INPUT_TOKEN
|
export JEKYLL_GITHUB_TOKEN=$INPUT_TOKEN
|
||||||
export PAGES_REPO_NWO=$GITHUB_REPOSITORY
|
export PAGES_REPO_NWO=$GITHUB_REPOSITORY
|
||||||
|
|
||||||
if [ -z $INPUT_VERBOSE ]; then
|
# Set verbose flag
|
||||||
VERBOSE=''
|
if [ "$INPUT_VERBOSE" = 'true' ]; then
|
||||||
else
|
|
||||||
VERBOSE='--verbose'
|
VERBOSE='--verbose'
|
||||||
|
else
|
||||||
|
VERBOSE=''
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $PAGES_GEM_HOME
|
# Set future flag
|
||||||
|
if [ "$INPUT_FUTURE" = 'true' ]; then
|
||||||
|
FUTURE='--future'
|
||||||
|
else
|
||||||
|
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"
|
||||||
|
|||||||
Reference in New Issue
Block a user