From accd1e24994b7072eee7a025442c2e66056e4111 Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Thu, 23 Apr 2020 12:28:39 -0300 Subject: [PATCH] Initial code --- Dockerfile | 5 +++++ action.yml | 6 ++++++ entrypoint.sh | 14 ++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 Dockerfile create mode 100644 action.yml create mode 100755 entrypoint.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bba4472 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM python:3.8 + +COPY entrypoint.sh /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..5faba34 --- /dev/null +++ b/action.yml @@ -0,0 +1,6 @@ +# action.yml +name: 'Deploy to GH Pages' +description: 'Build the site using Nikola and deploy to GH Pages' +runs: + using: 'docker' + image: 'Dockerfile' diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..6ab1ac5 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -e + +echo "REPO: $GITHUB_REPOSITORY" +echo "ACTOR: $GITHUB_ACTOR" + +echo '# Install Requirements' +pip install -r requirements.txt +echo '# Build site' +nikola build +echo '# Publish to GitHub Pages' +nikola github_deploy +echo '# Done' \ No newline at end of file