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

38 lines
788 B
YAML
Raw Normal View History

2021-05-21 14:17:05 +00:00
stages:
2022-01-22 14:57:27 +00:00
- build
- deploy
2021-05-21 14:17:05 +00:00
Build:
image: node:alpine
2021-05-21 14:17:05 +00:00
stage: build
before_script:
2021-05-21 14:17:05 +00:00
- 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
2021-12-05 20:10:12 +00:00
- 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