Skip to content

Jekyll build to Github Pages #9

Jekyll build to Github Pages

Jekyll build to Github Pages #9

Workflow file for this run

name: Jekyll build to Github Pages
# manual for now
on: workflow_dispatch
# allows only one concurrent workflow execution (with the same group)
# also do NOT cancel in-progress runs, let them complete
concurrency:
group: "pages"
cancel-in-progress: false
# allow GITHUB_TOKEN to deploy to github pages
permissions:
contents: read
pages: write
id-token: write
jobs:
jekyll_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true # runs 'bundle install' and caches installed gems
- name: Add commit SHA to footer
run: sed -i "s/%%%SHA/$GITHUB_SHA/" _includes/footer.html
- name: Jekyll build
env:
JEKYLL_ENV: production
run: bundle exec jekyll build
- name: Upload artifact # create github pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: "_site/" # _site is the default jekyll build dir
deploy_pages:
runs-on: ubuntu-latest
needs: jekyll_build
steps:
- uses: actions/deploy-pages@v2 # deploy site artifact to github-pages environment