diff options
author | Devan Carpenter <git@dvn.me> | 2021-01-08 18:08:09 +0100 |
---|---|---|
committer | Devan Carpenter <git@dvn.me> | 2021-01-08 18:08:09 +0100 |
commit | ec476e9fbdca2805e0680a72b63a07ae6958d77b (patch) | |
tree | ceaf32dc9cf344b5d07e367da4d90b54b749e73b /.gitlab-ci.yml | |
parent | 69e3be818e62d868f5430b0ad5afc08d99506b25 (diff) | |
download | dream.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
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 19 |
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 |