Skip to content

Instantly share code, notes, and snippets.

@aadimator
Created August 25, 2020 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aadimator/9bc67336abdbaa15cbdbcc7c8548cc2a to your computer and use it in GitHub Desktop.
Save aadimator/9bc67336abdbaa15cbdbcc7c8548cc2a to your computer and use it in GitHub Desktop.
Workflow for auto-publishing notes using Jekyll digital-garden-template
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout jekyll repo
uses: actions/checkout@v2
with:
repository: aadimator/digital-garden-jekyll-template
- name: Checkout notes
uses: actions/checkout@v2
with:
path: _notes
# Use GitHub Actions' cache to shorten build times and decrease load on servers
- uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- uses: helaili/jekyll-action@2.0.1
env:
JEKYLL_PAT: ${{ secrets.JEKYLL_PAT }}
# Runs a single command using the runners shell
- name: Run a one-line script
run: ls $GITHUB_WORKSPACE
# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
ls $GITHUB_WORKSPACE/_notes
echo test, and deploy your project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment