website/.drone.yml

78 lines
1.9 KiB
YAML
Raw Permalink Normal View History

kind: pipeline
name: default
steps:
- name: build_stable
2020-05-29 20:42:57 +00:00
image: debian:buster-slim
commands:
2021-01-26 19:14:58 +00:00
- apt-get update; apt-get upgrade -y
- apt-get install -y wget git
2023-03-06 19:15:41 +00:00
- wget https://github.com/gohugoio/hugo/releases/download/v0.111.2/hugo_extended_0.111.2_linux-amd64.deb -O hugo.deb
- dpkg -i hugo.deb
- hugo --destination _site/
when:
branch:
- main
- name: build_staging
image: debian:buster-slim
commands:
- apt-get update; apt-get upgrade -y
- apt-get install -y wget git
- wget https://github.com/gohugoio/hugo/releases/download/v0.111.2/hugo_extended_0.111.2_linux-amd64.deb -O hugo.deb
- dpkg -i hugo.deb
- hugo --baseURL "https://staging.data.coop" --destination _site/
when:
branch:
- staging
2023-03-06 19:15:41 +00:00
2023-07-26 14:57:00 +00:00
# stable site
2023-07-26 14:58:26 +00:00
- name: docker_stable
2019-03-02 21:45:48 +00:00
image: plugins/docker
2019-03-16 19:28:36 +00:00
settings:
repo: docker.data.coop/data-coop-website
registry: docker.data.coop
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
2023-03-06 19:15:41 +00:00
tags:
2019-03-16 19:28:36 +00:00
- "${DRONE_BUILD_NUMBER}"
2023-07-26 14:57:00 +00:00
- "stable"
2019-03-03 14:14:42 +00:00
when:
branch:
2023-07-25 19:49:45 +00:00
- main
2023-03-06 19:15:41 +00:00
event:
exclude:
- pull_request
2023-07-26 14:57:00 +00:00
# staging site
2023-07-26 14:58:26 +00:00
- name: docker_staging
2023-07-26 14:57:00 +00:00
image: plugins/docker
settings:
repo: docker.data.coop/data-coop-website
registry: docker.data.coop
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
tags:
- "${DRONE_BUILD_NUMBER}"
- "staging"
when:
branch:
- staging
event:
exclude:
- pull_request
- name: notify
image: plugins/matrix
settings:
homeserver: https://data.coop
roomid: plKSghHbepWeUEtbHE:data.coop
username:
from_secret: matrix_username
password:
from_secret: matrix_password