From 57004114fbe42b83ce437595f68bc015fb0dfd6a Mon Sep 17 00:00:00 2001 From: Caspar Jungbacker Date: Mon, 17 Apr 2023 20:01:32 +0200 Subject: [PATCH] Update .gitlab-ci.yml - Update the `rsync` command so that it deletes files that are not included in the build anymore - Allow for empty commits --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6c3e5bc..654bcca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,7 +43,7 @@ push-html: - git fetch origin publish-html - git checkout publish-html script: - - rsync -av --delete book/_build/html/* ./. - - git add --all -- ':!book/*' ':!.cache/*' - - git commit -m "$CI_COMMIT_MESSAGE" + - rsync -av --delete-after --exclude=".git/" --exclude=".cache/" ./book/_build/html/ . + - git add --all -- ':!.cache/*' + - git commit --allow-empty -m "$CI_COMMIT_MESSAGE" - git push https://gitlab-ci-token:$ACCESS_TOKEN@gitlab.tudelft.nl/$CI_PROJECT_PATH.git publish-html