forked from pywebio/PyWebIO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
30 lines (27 loc) · 924 Bytes
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
kind: pipeline
type: exec
name: default
clone:
disable: true
trigger:
branch:
- dev
event:
- push
steps:
- name: clone
commands:
- sleep 300 # wait aliyun repo to sync
- git init
- git remote add aliyun "https://code.aliyun.com/wang0618/pywebio.git"
- git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 aliyun $DRONE_BRANCH
- git checkout --progress --force -B $DRONE_BRANCH aliyun/$DRONE_BRANCH
- git log -1
- name: deploy demos
commands:
- docker rm -f pywebio-demos || true
- >
docker run --restart=always --name=pywebio-demos -v $PWD:/app_tmp
--label="traefik.http.services.pywebiodemos.loadbalancer.server.port=80"
-d python:3 bash -c "cp -r /app_tmp /app && cd /app && pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple . && python3 -m demos --port=80"
- sleep 5 # wait container start