From 66cf7db1486e69a92087ab4c3cc79890d3adc3a2 Mon Sep 17 00:00:00 2001 From: Peter Prumbach Date: Sun, 13 Nov 2022 21:40:13 +0100 Subject: [PATCH] feat: minify minfied hugo pipeline (#16) - fix: fatal: destination path '/tmp' already exists and is not an empty directory - fix: .domains should be copied to repo folder not to hugo output folder - feat: git commit message must not contain CI SKIP when pages branch is excluded from pipeline Co-authored-by: Peter Prumbach Reviewed-on: https://codeberg.org/Codeberg-CI/examples/pulls/16 Co-authored-by: Peter Prumbach Co-committed-by: Peter Prumbach --- Hugo/hugo.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Hugo/hugo.yml b/Hugo/hugo.yml index 41fcf11..e5267e3 100644 --- a/Hugo/hugo.yml +++ b/Hugo/hugo.yml @@ -37,15 +37,18 @@ pipeline: # Git configuration - git config --global user.email $MAIL - git config --global user.name "Woodpecker CI" - - git clone -b pages https://$CODEBERG_TOKEN@codeberg.org/$CI_REPO.git /tmp/$CI_REPO_NAME/ + - git clone -b pages https://$CODEBERG_TOKEN@codeberg.org/$CI_REPO.git $CI_REPO_NAME # Copy build step output to repository folder - - cp -ar $HUGO_OUTPUT/. /tmp/$CI_REPO_NAME/ + - cp -ar $HUGO_OUTPUT/. $CI_REPO_NAME/ # Needed for custom domains - - cp .domains $HUGO_OUTPUT/ || true # Ignore if it doesn't exist + - cp .domains $CI_REPO_NAME || true # Ignore if it doesn't exist # Commit and push all static files with pipeline started timestamp - - cd /tmp/$CI_REPO_NAME/ + - cd $CI_REPO_NAME - git add . - - git commit -m "Woodpecker CI ${CI_BUILD_CREATED} [CI SKIP]" + - git commit -m "Woodpecker CI ${CI_BUILD_CREATED}" - git push when: event: push + +branches: + exclude: [ pages ] \ No newline at end of file