aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevan Carpenter <git@dvn.me>2021-01-08 18:08:09 +0100
committerDevan Carpenter <git@dvn.me>2021-01-08 18:08:09 +0100
commitec476e9fbdca2805e0680a72b63a07ae6958d77b (patch)
treeceaf32dc9cf344b5d07e367da4d90b54b749e73b
parent69e3be818e62d868f5430b0ad5afc08d99506b25 (diff)
downloaddream.public.cat-ec476e9fbdca2805e0680a72b63a07ae6958d77b.tar.gz
CI: add initial .gitlab-ci.yml for deployment
We want the CI to deploy to our staging site[0] upon every commit to the main branch, and to our produciton site[1] only from new tags in the main branch. [0] https://dream-stage.public.cat [1] https://dream.public.cat
-rw-r--r--.gitlab-ci.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..f171d6d
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,19 @@
+image:
+ name: alpine@sha256:3c7497bf0c7af93428242d6176e8f7905f2201d8fc5861f45be7a346b5f23436
+
+.setup: &setup
+ - apk -U add curl
+
+staging:
+ extends: .setup
+ script:
+ - curl "https://$authuser:$authpass@dream.public.cat/api/deploy/stage"
+
+production:
+ extends: .setup
+ script:
+ - curl "https://$authuser:$authpass@dream.public.cat/api/deploy/production/$CI_COMMIT_REF_NAME"
+ only:
+ - tags
+ except:
+ - branches