bjwz-china/.drone.yml

30 lines
903 B
YAML

kind: pipeline
type: docker
name: Build & Deploy
steps:
- name: Build Docs
image: node:lts-buster
commands:
- yarn install
- yarn build --dest public
- name: SSH Deploy
image: bitnami/git
environment:
SSH:
from_secret: ssh_key
commands:
- mkdir -p ~/.ssh/
- echo "$SSH" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan gitlab.igem.org >> ~/.ssh/known_hosts
- git config --global user.name Nofated095 && git config --global user.email nofated095@outlook.com
- git clone git@gitlab.igem.org:2023/bjwz-china.git && cd bjwz-china && rm -rf ./* && cd ../
- cd ./public/assets
- find ./ -type f -name "source-sans-pro-*" -exec rm {} \;
- cd ../../
- mv ./public ./bjwz-china
- cp ./.gitlab-ci.yml ./bjwz-china && cp ./README.md ./bjwz-china && cp ./LICENSE ./bjwz-china
- cd ./bjwz-china && git add . && git commit -m '[Drone CI] Update' && git push