From ba734e5463c251889fb94330d35fdd30ba843a02 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Sun, 13 Feb 2022 10:59:34 -0600 Subject: [PATCH] Cache repository to speed up CI runtime --- .woodpecker.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index d29b27a..39dccbd 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -2,11 +2,19 @@ clone: git: image: bash commands: - - git clone --recursive https://git.exozy.me/Ta180m/website.git + - mkdir -p /var/lib/woodpecker-agent/Ta180m + - cd /var/lib/woodpecker-agent/Ta180m + - if [ -d website ]; then + - cd website + - git pull + - git submodule update + - else + - git clone --recursive https://git.exozy.me/Ta180m/website.git + - fi pipeline: build: image: bash commands: - - cd website + - cd /var/lib/woodpecker-agent/Ta180m/website - hugo --minify --destination /srv/http/pages/ta180m