summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusalva Jesusalva <jesusalva@themanaworld.org>2022-10-25 14:59:29 +0000
committerJesusalva Jesusalva <jesusalva@themanaworld.org>2022-10-25 14:59:29 +0000
commitaa8539cb357e956900ca3c5128cc78f675ee4246 (patch)
tree02f389cc286f83a11bdf2595cfc0c6e5541eefaa
parentd1deeef8304304209fb9b1af73eb6c75d9e70a7f (diff)
downloadclientdata-aa8539cb357e956900ca3c5128cc78f675ee4246.tar.gz
clientdata-aa8539cb357e956900ca3c5128cc78f675ee4246.tar.bz2
clientdata-aa8539cb357e956900ca3c5128cc78f675ee4246.tar.xz
clientdata-aa8539cb357e956900ca3c5128cc78f675ee4246.zip
Deployment rules
-rw-r--r--.gitlab-ci.yml35
1 files changed, 35 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6d30f4b..f76cd6a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,6 @@
stages:
- test
+- deploy
image: debian:stable
before_script:
@@ -12,6 +13,7 @@ testxml:
script:
- ./.tools/testxml.sh
- pwd
+ allow_failure: true
image: debian:buster
pngcheck:
@@ -61,3 +63,36 @@ newlines:
- ./.tools/licensecheck.sh
allow_failure: true
+
+pages:
+ stage: deploy
+ variables:
+ GIT_STRATEGY: clone
+ GIT_SUBMODULE_STRATEGY: recursive
+ GIT_DEPTH: "1"
+ UPDATE_DIR: "../../../public"
+ UPDATE_HTTP: "none"
+ CC: "clang"
+ tags:
+ - glados
+ script:
+ - apt-get -qq update
+ - apt-get install -qq -y make zip zlib1g-dev zlibc python ssh rsync python3
+ - mkdir public
+ - git clone https://git.themanaworld.org/CR/tools.git tools
+ - cd tools
+ - cp adler32/adler32 /bin/
+ - cd update
+ - ./createnew.sh
+ - cp -rv upload/ public/
+ - echo '<title>static update server</title><a href="TMW.zip">TMW.zip</a><br><a href="TMW-music.zip">TMW-music.zip</a><br><a href="news.txt">news.txt</a><br><a href="resources.xml">resources.xml</a>' > public/index.html
+ - echo "Now deploying..."
+ - mkdir -p ~/.ssh
+ - echo "${SSH_PRIVATE_KEY}" | base64 -d | tr -d '\r' > ~/.ssh/id_rsa
+ - chmod -R 700 ~/.ssh
+ - rsync -e 'ssh -p 22 -o StrictHostKeyChecking=no' -aHv --delete public/updates $MYHOST:$FILE_LOCATION
+ artifacts:
+ paths:
+ - public
+ only:
+ - stable