Add theme-checkout option to GitHub Pages workflow

This commit is contained in:
Sean Hammond 2025-11-25 18:29:15 +00:00 committed by Justin Mayer
commit 993d21401f
2 changed files with 66 additions and 52 deletions

View file

@ -22,6 +22,11 @@ on:
default: ""
description: "The GitHub repo URL of a custom theme to use, for example: 'https://github.com/seanh/sidecar.git'"
type: string
theme-checkout:
required: false
default: ""
description: "Git ref (branch, tag or commit) of the theme repo to checkout. This can be used to pin the version of your theme. If not specified defaults to the theme repo's default branch."
type: string
python:
required: false
default: "3.14"
@ -61,9 +66,12 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python }}
- name: Checkout theme
- name: Clone theme
if: ${{ inputs.theme }}
run: git clone '${{ inputs.theme }}' .theme
- name: Checkout theme ref
if: ${{ inputs.theme && inputs.theme-checkout }}
run: git -C .theme checkout '${{ inputs.theme-checkout }}'
- name: Configure GitHub Pages
id: pages
uses: actions/configure-pages@v5