From 5095a2b851517166d0b107b9db353e434fb4f771 Mon Sep 17 00:00:00 2001 From: TheJoeCoder <joe@radialbog9.uk> Date: Sun, 7 Jul 2024 10:27:35 +0100 Subject: [PATCH] Start work on python script --- .gitlab-ci.yml | 8 +++----- build_site.py | 2 ++ requirements.txt | 1 + {public => templates}/index.html | 0 4 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 build_site.py create mode 100644 requirements.txt rename {public => templates}/index.html (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9f1699a..efa33f0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,12 +1,10 @@ -# This file is a template, and might need editing before it works on your project. -# Full project: https://gitlab.com/pages/plain-html - -image: busybox +image: "python:3" pages: stage: deploy script: - - echo "The site will be deployed to $CI_PAGES_URL" + - python3 -m pip install -r requirements.txt + - python3 build_site.py artifacts: paths: - public diff --git a/build_site.py b/build_site.py new file mode 100644 index 0000000..88d9cf3 --- /dev/null +++ b/build_site.py @@ -0,0 +1,2 @@ +import shutil +shutil.copyfile("templates/index.html", "public/index.html") \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..46da994 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +Jinja2~=3.1.4 \ No newline at end of file diff --git a/public/index.html b/templates/index.html similarity index 100% rename from public/index.html rename to templates/index.html -- GitLab