From 5c095b6a7363c2a945c7e84ba36f89bbb98d8e0d Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sun, 20 Mar 2022 12:20:06 +0000 Subject: [PATCH 01/11] Delete .hugo_build.lock --- .hugo_build.lock | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .hugo_build.lock diff --git a/.hugo_build.lock b/.hugo_build.lock deleted file mode 100644 index e69de29b..00000000 From baa3fcb76dc87a8b3f1c332f22da406b88d7c40c Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sun, 20 Mar 2022 12:23:18 +0000 Subject: [PATCH 02/11] Add new file --- .github-ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github-ci.yml diff --git a/.github-ci.yml b/.github-ci.yml new file mode 100644 index 00000000..3578da3d --- /dev/null +++ b/.github-ci.yml @@ -0,0 +1,13 @@ +image: registry.gitlab.com/pages/hugo/hugo_extended:latest + +variables: + GIT_SUBMODULE_STRATEGY: recursive + +pages: + script: + - hugo + artifacts: + paths: + - public + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH From a3c4230fb568ed99c84c09037b1eeda1596941d0 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sun, 20 Mar 2022 12:25:50 +0000 Subject: [PATCH 03/11] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..190457d1 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,13 @@ +image: registry.gitlab.com/pages/hugo/hugo_extended:latest + +variables: + GIT_SUBMODULE_STRATEGY: recursive + +pages: + script: + - hugo + artifacts: + paths: + - public + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH \ No newline at end of file From 889a39f4fd8ccb4ccd90c135c2874cee0ca58f40 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sun, 20 Mar 2022 13:15:09 +0000 Subject: [PATCH 04/11] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 190457d1..22249fde 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,11 @@ image: registry.gitlab.com/pages/hugo/hugo_extended:latest variables: GIT_SUBMODULE_STRATEGY: recursive + + pages: + before_script: + - apk add --update --no-cache openssh script: - hugo artifacts: From 557015737a2e544af69cedfbf99ebd4365f77686 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sun, 20 Mar 2022 13:26:26 +0000 Subject: [PATCH 05/11] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 22249fde..a6bffdf9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,9 +7,10 @@ variables: pages: before_script: - - apk add --update --no-cache openssh + - apk add --update --no-cache openssh sshpass script: - hugo + - sshpass -p "$scp_password" scp public $scp_path artifacts: paths: - public From 21d904e56284e67e06b14b182b8b2ada4ca2f759 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sun, 20 Mar 2022 13:28:36 +0000 Subject: [PATCH 06/11] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a6bffdf9..523ffedd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ pages: - apk add --update --no-cache openssh sshpass script: - hugo - - sshpass -p "$scp_password" scp public $scp_path + - sshpass -p $scp_password scp public $scp_path artifacts: paths: - public From 3a4db6cc067e88dfe68a85ee01f5bc3bade35ce7 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sun, 20 Mar 2022 13:29:25 +0000 Subject: [PATCH 07/11] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 523ffedd..941e9acd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ pages: - apk add --update --no-cache openssh sshpass script: - hugo - - sshpass -p $scp_password scp public $scp_path + - sshpass -p $scp_password scp -r public $scp_path artifacts: paths: - public From ffb1c5356454506245586f48f77e3d7cf2d5f7b8 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sun, 20 Mar 2022 13:32:06 +0000 Subject: [PATCH 08/11] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 941e9acd..11927ccd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ pages: - apk add --update --no-cache openssh sshpass script: - hugo - - sshpass -p $scp_password scp -r public $scp_path + - sshpass -p $scp_password scp -oStrictHostKeyChecking=no -r public $scp_path artifacts: paths: - public From 5f914c26695aa49b2e71d2dba58417a153d27eaa Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sun, 20 Mar 2022 16:37:31 +0000 Subject: [PATCH 09/11] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 11927ccd..5ef51e5f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,12 +5,23 @@ variables: -pages: +deploy_website: before_script: - - apk add --update --no-cache openssh sshpass + - apk add --update --no-cache git curl + - git config --global user.name "Denys Konovalov" + - git config --global user.email "denys.konovalov@protonmail.com" script: - - hugo - - sshpass -p $scp_password scp -oStrictHostKeyChecking=no -r public $scp_path + - hugo --gc --minify --cleanDestinationDir + - git clone --depth=1 --single-branch --branch "${INPUT_BRANCH}" "https://x-access-token:$TOKEN@gitlab.cantorgymnasium.de/cantortechnik/website-build.git" /tmp/gh-pages + - rm -rf /tmp/gh-pages/* + - export OLD_PATH=$PWD + - cp public/* /tmp/gh-pages + - cd /tmp/gh-pages + - git add . + - git commit -m "$CI_COMMIT_MESSAGE" + - git push -u origin main --force + - cd $OLD_PATH + - curl $host_url artifacts: paths: - public From 222b77a1de06b196d5e6e365c267c470cb279866 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sun, 20 Mar 2022 16:40:35 +0000 Subject: [PATCH 10/11] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5ef51e5f..85fcb5bd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ deploy_website: - git config --global user.email "denys.konovalov@protonmail.com" script: - hugo --gc --minify --cleanDestinationDir - - git clone --depth=1 --single-branch --branch "${INPUT_BRANCH}" "https://x-access-token:$TOKEN@gitlab.cantorgymnasium.de/cantortechnik/website-build.git" /tmp/gh-pages + - git clone --depth=1 --single-branch --branch main "https://x-access-token:$TOKEN@gitlab.cantorgymnasium.de/cantortechnik/website-build.git" /tmp/gh-pages - rm -rf /tmp/gh-pages/* - export OLD_PATH=$PWD - cp public/* /tmp/gh-pages From 70b47d1510182aa6d3ed30786dcba3fd5b8b0ef2 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sun, 20 Mar 2022 16:41:21 +0000 Subject: [PATCH 11/11] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 85fcb5bd..c30082e7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,7 +15,7 @@ deploy_website: - git clone --depth=1 --single-branch --branch main "https://x-access-token:$TOKEN@gitlab.cantorgymnasium.de/cantortechnik/website-build.git" /tmp/gh-pages - rm -rf /tmp/gh-pages/* - export OLD_PATH=$PWD - - cp public/* /tmp/gh-pages + - cp -r public/* /tmp/gh-pages - cd /tmp/gh-pages - git add . - git commit -m "$CI_COMMIT_MESSAGE"