Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add drafts parameter #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ jobs:
aws s3 sync ./_site/ s3://my-s3-bucket --delete
```

# Parameters

## Drafts

Pass `true` to preview your site with drafts:

```yaml
- name: Build
uses: jerryjvl/jekyll-build-action@v1
with:
drafts: true
```

# References
For more technical details on these steps and associated setup, see:
- [actions/checkout](https://github.com/actions/checkout)
Expand Down
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ description: 'Local pipeline build of Jekyll content; follow-on actions must pub
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.drafts }}
inputs:
drafts:
description: 'Whether to include draft posts in build (defaults to false)'
required: false
branding:
icon: 'book-open'
color: 'white'
7 changes: 6 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ chmod -R a+w /github/workspace
# Build the Jekyll site
####################################################

jekyll build --trace
if [ "$1" = "true" ]
then
jekyll build --trace --drafts
else
jekyll build --trace
fi

####################################################
# Build completed
Expand Down