29 lines
1013 B
YAML
29 lines
1013 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 ../
|
|
- mv ./public ./bjwz-china
|
|
# - cd ./bjwz-china && mkdir assets && cd assets && mkdir fontawesome && cd fontawesome && cd ../../../
|
|
# - mv ./fontawesome/css ./bjwz-china/assets/fontawesome/css && mv ./fontawesome/webfonts ./bjwz-china/assets/fontawesome/webfonts
|
|
- cp ./.gitlab-ci.yml ./bjwz-china && cp ./README.md ./bjwz-china
|
|
- cd ./bjwz-china && git add . && git commit -m '[Drone CI] Update' && git push
|