Newer
Older
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
- test-site
- deploy-site
test:
stage: test-site
script:
- apt-get update
- apt-get dist-upgrade -y
- apt-get install -y jekyll
- bundle install
- mkdir build
- jekyll build --destination=build/
- cp .htaccess build/
# Artifacts
artifacts:
expire_in: 1 day
paths:
- build/
deploy:
stage: deploy-site
script:
- apt-get update
- apt-get dist-upgrade -y
- apt-get install -y lftp ca-certificates
- echo 'set ssl:ca-file "/etc/ssl/certs/ca-certificates.crt"' >> /etc/lftp.conf
- echo 'set net:max-retries "5"' >> /etc/lftp.conf
- echo 'set net:timeout "60"' >> /etc/lftp.conf
- lftp -e "mirror --exclude ^\.git.* --exclude \.gitlab-ci.yaml --delete --reverse --no-perms --verbose $CI_PROJECT_DIR/build .; quit;" -p $SERVER_PORT -u $CREDENTIALS https://$SERVER/
only:
- master@linux.community/linux-community-site
# Artifacts
artifacts:
expire_in: 1 day
paths:
- build/