From 141d0f2c173549814c6ebb662f6c7000c0a63c81 Mon Sep 17 00:00:00 2001 From: selene kendall Date: Sat, 25 Apr 2026 13:46:57 +0200 Subject: [PATCH] feat: added a ci/cd pipeline to deploy this doohickey --- .gitlab-ci.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..a5b7bde --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,36 @@ +stages: + - build + - deploy + +build-job: + stage: build + before_script: + - apt-get update && apt-get install -y hugo + script: + - hugo --minify + artifacts: + paths: + - public/ + only: + - main + +deploy-job: + stage: deploy + before_script: + # stolen from https://help.ovhcloud.com/csm/asia-vps-deploy-website-gitlab-ci-cd?id=kb_article_view&sysparm_article=KB0066282 + # and from https://docs.gitlab.com/ci/jobs/ssh_keys/ + - apt-get update && apt-get install -y rsync openssh-client + + - eval $(ssh-agent -s) + - chmod 400 "$SSH_PRIVATE_KEY" + - ssh-add "$SSH_PRIVATE_KEY" + + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + + - cp "$SSH_KNOWN_HOSTS" ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + script: + - rsync -avz --delete public/ debian@wasp.best:/var/www/html/ + only: + - main