Newer
Older
- test-site
- deploy-site
test:
stage: test-site
script:
- apt-get update
- apt-get dist-upgrade -y
- 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/