diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e69de29..0c5c6f8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -0,0 +1,26 @@ +stages: + - build and deploy + +build and deploy: + stage: build and deploy + only: + - main + image: node:18 + before_script: + - apt-get update -qq && apt-get install -y -qq lftp + script: + - npm ci + - npm run build + - | + lftp -c " + set ftp:ssl-allow no; # Désactive SSL si nécessaire + open -u $USERNAME,$PASSWORD $HOST; # Connexion au serveur + mirror --reverse --verbose --ignore-time --parallel=10 + -x local/ + -x accounts/ + -x cache/ + -x sessions/ + dist/site site; + mirror --reverse --verbose --ignore-time --parallel=10 + dist/assets assets + quit"