-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
39 lines (36 loc) · 936 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
stages:
- build_web
- deploy
build_web:
stage: build_web
script:
- mkdir public
- mkdir public/img
- mkdir public/data
- cp *.html *.css *.js public
- cp roles-pantheons-spritesheet.png 4bfba3d77789a9ec16129032096c7f12.woff public
- cp img/* public/img
- cp data/*.json public/data
artifacts:
paths:
- public
deploy_prod:
stage: deploy
image: registry.gitlab.com/kissaki/docker-hugo:latest
before_script:
- eval $(ssh-agent -s)
- echo "$SFTP_PRIVKEY" | tr -d '\r' | ssh-add -k -t 10 -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SFTP_KNOWNHOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- cd public
- lftp -c "open -u $SFTP_USERNAME,NONE -p $SFTP_PORT sftp://$SFTP_HOST ; mirror --reverse . $SFTP_PATH"
after_script:
- ssh-add -D
environment:
name: production
url: https://kcode.de/smite/smitegods.html
only:
- master