This repository has been archived on 2023-03-14. You can view files and clone it, but cannot push or open issues or pull requests.
personal-website-old/.gitlab-ci.yml
2022-02-02 23:47:14 +01:00

38 lines
788 B
YAML

stages:
- build
- deploy
Build:
image: node:alpine
stage: build
before_script:
- yarn config set cache-folder .yarn
- yarn install
script:
- yarn run build
cache:
paths:
- node_modules/
- .yarn
artifacts:
paths:
- _site/
expire_in: 1 week
only:
- master
Deploy:
image: alpine
stage: deploy
before_script:
- apk add openssh-client lftp
- eval $(ssh-agent -s)
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
script:
- lftp sftp://fainsil:DUMMY@ftp.perso.bde.inp-toulouse.fr -e "mirror -e -R _site www_public --exclude content ; quit"
only:
- master