-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
59 lines (53 loc) · 1.11 KB
/
.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
image: ruby:2.5
stages:
- build
- package
- deploy
cache:
paths:
- vendor/
build:
stage: build
before_script:
- bundle install
script:
- echo "Build with Jekyll"
- bundle exec jekyll build --destination public
artifacts:
paths:
- public
expire_in: 10 minutes
package:
stage: package
script:
- echo "Package downloadable wiki"
- tar -zcvf wiki.tar.gz public
artifacts:
paths:
- wiki.tar.gz
upload:
stage: deploy
before_script:
- apt-get update
- apt install -y lftp
script:
- echo "Upload to $FTP_HOST"
# ftp and sftp are both supported in GitLab CI
- lftp ftp://$FTP_USERNAME:$FTP_PASSWORD@$FTP_HOST -e "set sftp:auto-confirm true; set ftp:use-utf8 false; mirror --reverse --verbose --delete public/ $FTP_DIR; bye"
only:
refs:
- master
variables:
- $FTP_PASSWORD
- $FTP_USERNAME
- $FTP_HOST
- $FTP_DIR
pages: # Job name cannot be changed; see https://docs.gitlab.com/ee/user/project/pages/getting_started_part_four.html#job
stage: deploy
script:
- echo "Deploy to pages"
artifacts:
paths:
- public
only:
- master