Skip to content

Build and deploy Jekyll site to GitHub Pages #1115

Build and deploy Jekyll site to GitHub Pages

Build and deploy Jekyll site to GitHub Pages #1115

Workflow file for this run

name: Build and deploy Jekyll site to GitHub Pages
on:
schedule:
# update site once per day so that the list of projects using Padauk is refreshed even if we don't push to master.
- cron: '0 0 * * *'
push:
branches:
- production
jobs:
github-pages:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
# https://github.com/actions/cache/blob/master/examples.md#ruby---bundler
- uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: 💎 setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
# https://github.com/actions/cache/blob/master/examples.md#ruby---bundler
- name: Jekyll build
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
bundle exec jekyll build --trace
env:
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
- name: Upload to GitHub Pages
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: _site
CLEAN: true
SINGLE_COMMIT: true
GIT_CONFIG_NAME: GitHub Actions
GIT_CONFIG_EMAIL: [email protected]