site_opytex/.drone.yml

64 lines
1.7 KiB
YAML
Raw Normal View History

2020-08-05 07:07:04 +00:00
kind: pipeline
2020-08-05 07:32:11 +00:00
name: Opytex Main
2020-08-05 07:07:04 +00:00
type: docker
2020-08-05 07:32:11 +00:00
trigger:
branch:
- master
2020-08-05 07:07:04 +00:00
steps:
2023-07-25 13:45:38 +00:00
# - name: Deploy
# image: python:3.8-alpine
# commands:
# - apk add --no-cache openssh-client ca-certificates bash rsync git imagemagick-dev imagemagick
# - git submodule init
# - git submodule update
# - pip install --no-cache-dir -r requirements.txt
# - export MAGICK_HOME=/usr
# - pelican ./content/ -o output -s publishconf.py --relative-urls
# - echo Début du Push
# - eval `ssh-agent -s`
# - echo "$SSH_KEY" | ssh-add -
# - mkdir -p ~/.ssh
# - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
# - rsync -rv --delete -e "ssh -p 22" --exclude "enseignements/" ./output/ sshcontent@91.121.90.228:~/opytex.org/www/ --checksum
# environment:
# SSH_KEY:
# from_secret: sshcontent-key
2020-08-05 07:07:04 +00:00
2023-07-25 13:43:19 +00:00
- name: Build Opytex base
image: python:3.8-alpine
volumes:
- name: pelican-output
path: /output
commands:
- apk add --no-cache git imagemagick-dev imagemagick
- git submodule init
- git submodule update
- pip install --no-cache-dir -r requirements.txt
- export MAGICK_HOME=/usr
- pelican ./content/ -o /output -s publishconf.py --relative-urls
- name: Push to bucket opytex.org
image: plugins/s3
volumes:
- name: pelican-output
2023-07-25 13:47:32 +00:00
path: /output
2023-07-25 13:43:19 +00:00
settings:
bucket: opytex.org
endpoint: https://storage.opytex.org
access_key:
from_secret: minio_access_key
secret_key:
from_secret: minio_secret_key
2023-07-25 13:49:37 +00:00
source: /output/*
2023-07-25 13:43:19 +00:00
target: /
path_style: true
volumes:
- name: tosend
temp: {}
- name: pelican-output
temp: {}