mirror of
https://github.com/getpelican/pelican.git
synced 2026-06-05 00:16:55 +02:00
Add theme-checkout option to GitHub Pages workflow
This commit is contained in:
parent
945fd6d3b6
commit
993d21401f
2 changed files with 66 additions and 52 deletions
10
.github/workflows/github_pages.yml
vendored
10
.github/workflows/github_pages.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
108
docs/tips.rst
108
docs/tips.rst
|
|
@ -205,57 +205,63 @@ the workflow, for example:
|
|||
|
||||
Here's the complete list of workflow inputs:
|
||||
|
||||
+------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| Name | Required | Description | Type | Default |
|
||||
+==================+==========+============================================+========+===============+
|
||||
| ``settings`` | Yes | The path to your Pelican settings | string | |
|
||||
| | | file (``pelican``'s | | |
|
||||
| | | ``--settings`` option), | | |
|
||||
| | | for example: ``"publishconf.py"`` | | |
|
||||
+------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| ``requirements`` | No | The Python requirements to | string | ``"pelican"`` |
|
||||
| | | install, for example to enable | | |
|
||||
| | | markdown and typogrify use: | | |
|
||||
| | | ``"pelican[markdown] typogrify"`` | | |
|
||||
| | | or if you have a requirements | | |
|
||||
| | | file: ``"-r requirements.txt"`` | | |
|
||||
+------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| ``output-path`` | No | Where to output the generated | string | ``"output/"`` |
|
||||
| | | files (``pelican``'s ``--output`` | | |
|
||||
| | | option) | | |
|
||||
+------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| ``theme`` | No | The GitHub repo URL of a custom | string | ``""`` |
|
||||
| | | theme to use, for example: | | |
|
||||
| | | ``"https://github.com/seanh/sidecar.git"`` | | |
|
||||
+------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| ``python`` | No | The version of Python to use to build the | string | ``"3.12"`` |
|
||||
| | | site, for example: ``"3.12"`` (to use the | | |
|
||||
| | | most recent version of Python 3.12, this | | |
|
||||
| | | is faster) or ``"3.12.1"`` (to use an | | |
|
||||
| | | exact version, slower) | | |
|
||||
+------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| ``siteurl`` | No | The base URL of your web site (Pelican's | string | The URL of |
|
||||
| | | ``SITEURL`` setting). If not passed this | | your GitHub |
|
||||
| | | will default to the URL of your GitHub | | Pages site. |
|
||||
| | | Pages site, which is correct in most | | |
|
||||
| | | cases. | | |
|
||||
+------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| ``feed_domain`` | No | The domain to be prepended to feed URLs | string | The URL of |
|
||||
| | | (Pelican's ``FEED_DOMAIN`` setting). If | | your GitHub |
|
||||
| | | not passed this will default to the URL of | | Pages site. |
|
||||
| | | your GitHub Pages site, which is correct | | |
|
||||
| | | in most cases. | | |
|
||||
+------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| ``deploy`` | No | This is used to determine whether you will | bool | ``true`` |
|
||||
| | | deploy the site or not to GitHub Pages. | | |
|
||||
| | | This is most useful if you want to test a | | |
|
||||
| | | change to your website in a pull request | | |
|
||||
| | | before deploying those change. | | |
|
||||
+------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| ``stork`` | No | This is used to determine whether Stork | bool | ``false`` |
|
||||
| | | will be installed on the runner to be able | | |
|
||||
| | | to build a site with Stork search enabled | | |
|
||||
+------------------+----------+--------------------------------------------+--------+---------------+
|
||||
+--------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| Name | Required | Description | Type | Default |
|
||||
+====================+==========+============================================+========+===============+
|
||||
| ``settings`` | Yes | The path to your Pelican settings | string | |
|
||||
| | | file (``pelican``'s | | |
|
||||
| | | ``--settings`` option), | | |
|
||||
| | | for example: ``"publishconf.py"`` | | |
|
||||
+--------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| ``requirements`` | No | The Python requirements to | string | ``"pelican"`` |
|
||||
| | | install, for example to enable | | |
|
||||
| | | markdown and typogrify use: | | |
|
||||
| | | ``"pelican[markdown] typogrify"`` | | |
|
||||
| | | or if you have a requirements | | |
|
||||
| | | file: ``"-r requirements.txt"`` | | |
|
||||
+--------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| ``output-path`` | No | Where to output the generated | string | ``"output/"`` |
|
||||
| | | files (``pelican``'s ``--output`` | | |
|
||||
| | | option) | | |
|
||||
+--------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| ``theme`` | No | The GitHub repo URL of a custom | string | ``""`` |
|
||||
| | | theme to use, for example: | | |
|
||||
| | | ``"https://github.com/seanh/sidecar.git"`` | | |
|
||||
+--------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| ``theme-checkout`` | No | Git ref (branch, tag or commit) of the | string | ``""`` |
|
||||
| | | 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. | | |
|
||||
+--------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| ``python`` | No | The version of Python to use to build the | string | ``"3.12"`` |
|
||||
| | | site, for example: ``"3.12"`` (to use the | | |
|
||||
| | | most recent version of Python 3.12, this | | |
|
||||
| | | is faster) or ``"3.12.1"`` (to use an | | |
|
||||
| | | exact version, slower) | | |
|
||||
+--------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| ``siteurl`` | No | The base URL of your web site (Pelican's | string | The URL of |
|
||||
| | | ``SITEURL`` setting). If not passed this | | your GitHub |
|
||||
| | | will default to the URL of your GitHub | | Pages site. |
|
||||
| | | Pages site, which is correct in most | | |
|
||||
| | | cases. | | |
|
||||
+--------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| ``feed_domain`` | No | The domain to be prepended to feed URLs | string | The URL of |
|
||||
| | | (Pelican's ``FEED_DOMAIN`` setting). If | | your GitHub |
|
||||
| | | not passed this will default to the URL of | | Pages site. |
|
||||
| | | your GitHub Pages site, which is correct | | |
|
||||
| | | in most cases. | | |
|
||||
+--------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| ``deploy`` | No | This is used to determine whether you will | bool | ``true`` |
|
||||
| | | deploy the site or not to GitHub Pages. | | |
|
||||
| | | This is most useful if you want to test a | | |
|
||||
| | | change to your website in a pull request | | |
|
||||
| | | before deploying those change. | | |
|
||||
+--------------------+----------+--------------------------------------------+--------+---------------+
|
||||
| ``stork`` | No | This is used to determine whether Stork | bool | ``false`` |
|
||||
| | | will be installed on the runner to be able | | |
|
||||
| | | to build a site with Stork search enabled | | |
|
||||
+--------------------+----------+--------------------------------------------+--------+---------------+
|
||||
|
||||
Testing Your Build in a GitHub Pull Request
|
||||
"""""""""""""""""""""""""""""""""""""""""""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue