forked from simulogics/prosperousuniverse-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
40 lines (36 loc) · 835 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
36
37
38
39
40
# All available Hugo versions are listed here: https://gitlab.com/pages/hugo/container_registry
image: registry.gitlab.com/pages/hugo:latest
variables:
GIT_SUBMODULE_STRATEGY: recursive
test:
stage: test
script:
- hugo
except:
- master
- staging
pages:
stage: deploy
script:
- hugo
artifacts:
paths:
- public
only:
- staging
deploy:
stage: deploy
before_script:
- apk add rsync openssh
- mkdir "${HOME}/.ssh"
- echo "${SSH_PRIVATE_KEY}" > "${HOME}/.ssh/id_rsa"
- chmod 700 "${HOME}/.ssh/id_rsa"
- echo "${SSH_HOST_KEY}" > "${HOME}/.ssh/known_hosts"
script:
- hugo -b "https://handbook.apex.prosperousuniverse.com/"
- rsync -a --delete -e ssh public/ [email protected]:/opt/gitlab/handbook.apex.prosperousuniverse.com/
artifacts:
paths:
- public
only:
- master