-
Notifications
You must be signed in to change notification settings - Fork 11
/
.gitlab-ci.yml
35 lines (29 loc) · 993 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
stages:
- build
- generate
- deploy
before_script:
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
build_image:
stage: build
script: docker build -t systemli-website:latest --build-arg UID=$(id -u) .
generate_website:
stage: generate
artifacts:
untracked: true
script: docker run --rm -v $PWD:/data -u $(id -u):$(id -g) systemli-website:latest
deploy_prod:
stage: deploy
only: [main]
dependencies: [generate_website]
script: rsync -vrltgoDz --delete -e ssh public/ [email protected]:/var/www/www.systemli.org/www
deploy_staging:
stage: deploy
only: [staging]
dependencies: [generate_website]
script: rsync -vrltgoDz --delete -e ssh public/ [email protected]:/var/www/www.staging.systemli.org/www
deploy_preview:
stage: deploy
only: [preview]
dependencies: [generate_website]
script: rsync -vrltgoDz --delete -e ssh public/ [email protected]:/var/www/www.preview.systemli.org/www