You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.1 KiB
YAML

kind: pipeline
type: docker
name: default
steps:
- name: skip_tls_clone
image: plugins/git
settings:
depth: 10
skip_verify: true
- name: setup-virtualenv
image: python:3.7-alpine
commands:
- pip install virtualenv
- virtualenv /tmp/shared/.venv
- source /tmp/shared/.venv/bin/activate
- pip install -r requirements.txt
volumes:
- name: shared
path: /tmp/shared
- name: deploy
image: python:3.7-alpine
commands:
- apk add davfs2 wget make git
- mkdir /tmp/content
- mount -t davfs https://cloud.fdgl.rocks/public.php/webdav -o username=wGLnSaTiL2rn5ae /tmp/content
- cp -rf /tmp/content/drafts/*.md drafts/
- cp -rf /tmp/content/events/*.md events/
- cp -rf /tmp/content/pages/*.md pages/
- cp -rf /tmp/content/static/* static/
- source /tmp/shared/.venv/bin/activate
- nohup python app.py > log.txt 2>&1 &
- mkdir /tmp/target
- cd /mnt/target
- wget -mpEk http://127.0.0.1:3000
volumes:
- name: shared
path: /tmp/shared
volumes:
- name: shared
temp: {}
- name: docker-cache
host:
path: /var/cache/${DRONE_REPO_NAME}/docker