Pelican Build

This commit is contained in:
justgoodin 2021-07-12 16:17:02 +05:30
parent 03c9e3179e
commit fb4cd9b03e
2 changed files with 8 additions and 22 deletions

View file

@ -11,22 +11,15 @@ runs:
image: 'Dockerfile'
inputs:
GH_PAGES_BRANCH:
description: 'override the default `gh-pages` deployment branch'
required: false
default: 'gh-pages'
GH_PAGES_CNAME:
description: 'specify the custom domain configured for the output branch'
required: false
default: none
PELICAN_CONFIG_FILE:
description: 'override the default `pelicanconf.py` config file'
description: 'override the default `publishconf.py` config file'
required: false
default: pelicanconf.py
default: publishconf.py
PELICAN_CONTENT_FOLDER:
description: 'override the default `content` content folder'
required: false
default: content
PELICAN_THEME_FOLDER:
description: 'setup the theme folder with package.json file, is required if you need install node modules'
PELICAN_OUTPUT_FOLDER:
description: 'override the default `output` output folder'
required: false
default: output

View file

@ -6,22 +6,15 @@ echo "REPO: $GITHUB_REPOSITORY"
echo "ACTOR: $GITHUB_ACTOR"
remote_repo="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
remote_branch=${GH_PAGES_BRANCH:=gh-pages}
echo 'Installing Python 🐍 Requirements '
pip install -r requirements.txt
if [ -n "$PELICAN_THEME_FOLDER" ]; then
echo 'Installing Node Modules 🧰 '
pushd $PELICAN_THEME_FOLDER
npm install
popd
fi
echo 'Building site 👷 '
pelican ${PELICAN_CONTENT_FOLDER:=content} -o output -s ${PELICAN_CONFIG_FILE:=publishconf.py}
pelican ${PELICAN_CONTENT_FOLDER:=content} -o ${PELICAN_OUTPUT_FOLDER:=output} -s ${PELICAN_CONFIG_FILE:=publishconf.py}
echo 'Running add-ons ❌ 👉🏽 ✔ '
echo 'Running add-ons '
python addons.py
echo 'Build complete 🎉🎉 🕺💃 '