From fb4cd9b03eee5fa1f73aaa3cb9ac4a807c6dfd69 Mon Sep 17 00:00:00 2001 From: justgoodin Date: Mon, 12 Jul 2021 16:17:02 +0530 Subject: [PATCH] Pelican Build --- action.yml | 19 ++++++------------- entrypoint.sh | 11 ++--------- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/action.yml b/action.yml index b7b0e38..dfa6cf1 100644 --- a/action.yml +++ b/action.yml @@ -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' - required: false \ No newline at end of file + PELICAN_OUTPUT_FOLDER: + description: 'override the default `output` output folder' + required: false + default: output \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 9e54eed..77d5829 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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 πŸŽ‰πŸŽ‰ πŸ•ΊπŸ’ƒ '