Skip to content
Publish Jekyll drafts with a date greater than the current time
TypeScript Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
action.yml
package-lock.json
package.json
script.js
script.js.map
script.ts
start.sh
tsconfig.json

README.md

github-action-jekyll-publish-drafts

Explores the _draft folder of your jekyll repository, and publishes articles with the date frontmatter greater than the current time.

steps:
- uses: actions/checkout@v1
- name: Jekyll Publish Drafts
  uses: soywiz/github-action-jekyll-publish-drafts@master
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    jekyll_path: ./docs

This is useful as a cron action. For example each hour:

  on:
    schedule:
      - cron: '*/60 * * * *'

This way you can create drafts that will be autopublished automatically.

Full example:

name: CI

on:
  schedule:
    - cron: '*/60 * * * *'

jobs:
  build:

    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v1
    - name: Jekyll Publish Drafts
      uses: soywiz/github-action-jekyll-publish-drafts@master
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        jekyll_path: ./
You can’t perform that action at this time.