Commit bdc38098 authored by Marcus M. Scheunemann's avatar Marcus M. Scheunemann

all common commands in `before_script` and only install lftp in `deploy`

parent 9d1abcf5
image: ubuntu:18.04
stages:
- prepare
- build
- deploy
prepare environment:
stage: prepare
script:
- apt update -qq && apt install -y -qq lftp git python-pip
- python -V
- pip -V
before_script:
- apt update -qq && apt install -y -qq git python-pip
- git submodule update --init
- pip install virtualenv -q
- virtualenv pelican
......@@ -20,15 +11,16 @@ prepare environment:
generate website:
stage: build
script:
- source pelican/bin/activate
- pelican content -o output_local -s pelicanconf.py
- pelican content -o output -s pelicanconf.py
artifacts:
paths:
- website/
deploy website:
stage: deploy
only:
- master
script:
- apt install -y -qq lftp
- source pelican/bin/activate
- pelican content -o output -s publishconf.py
- lftp $FTP_SERVER -u $FTP_USER,$FTP_PASS -e "mirror -R output/ / ; quit"
- apt install -y -qq lftp
- lftp $FTP_SERVER -u $FTP_USER,$FTP_PASS -e "mirror -R output/ / ; quit"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment