cremeaux/.drone.yml

193 lines
4.7 KiB
YAML
Raw Normal View History

2022-02-02 17:38:21 +01:00
---
# drone encrypt Weko/cremeaux $DIRECTUS_URL
2022-02-02 17:38:21 +01:00
kind: secret
name: DIRECTUS_URL
data: RDzjslPRJRwgL9qhzcq3wVeCN91hAbO6vwd1XFCJ/G4Pm44iASdNjdZ3QfGja6pg1TJ1FSmZZg==
2022-02-02 17:38:21 +01:00
---
# drone encrypt Weko/cremeaux $DIRECTUS_TOKEN
2022-02-02 17:38:21 +01:00
kind: secret
name: DIRECTUS_TOKEN
data: NHpX9VNOhcDrS4feXOVi1sL2K44yvdGk9m4CUlpUImqpJGZ8gPQDX+0pffXjhkv6EerRaUsYA6cVNZvY
2022-02-02 17:38:21 +01:00
2022-12-02 10:18:02 +01:00
---
# drone encrypt Weko/cremeaux $AWS_ACCESS_KEY_ID
2022-12-02 10:18:02 +01:00
kind: secret
name: STAGING_AWS_ACCESS_KEY_ID
data: E8jzEjG64MRSoRO6g5CSQnNmpnP6Ck2EwIhPNwyVuGudzFGT88UbQ8gppUV9vF9vAoKQ/NNC
2022-12-02 10:18:02 +01:00
---
# drone encrypt Weko/cremeaux $AWS_SECRET_ACCESS_KEY
2022-12-02 10:18:02 +01:00
kind: secret
name: STAGING_AWS_SECRET_ACCESS_KEY
data: 6Vvc4kHWpQlx+2MOd8V4MLFXjg5EhIwDijQoQIdkhjwXaoIHjUlQdfSqidkE1JYKHSoL7k3/m/NKT4l+oTXv6MVDWcm2mWX5pnIA08PDHifgMEVDNUdgdbm3qpo=
2022-12-02 10:18:02 +01:00
---
# drone encrypt Weko/cremeaux $AWS_ACCESS_KEY_ID
2022-12-02 10:18:02 +01:00
kind: secret
name: PRODUCTION_AWS_ACCESS_KEY_ID
data: rQ4HtHyB7cMd024W6/vIeDNSHb5oHunINlq5Zvg/U1qWp/d0XnmgO0ArOg43A+XTyX5bHmFJ
2022-12-02 10:18:02 +01:00
---
# drone encrypt Weko/cremeaux $AWS_SECRET_ACCESS_KEY
2022-12-02 10:18:02 +01:00
kind: secret
name: PRODUCTION_AWS_SECRET_ACCESS_KEY
data: ep+PGU9itGdRKZkmPlqSdalU8HRZQLXP4wAS8y0jJc9TQIrNAxtYeR6Bpp3d9VN/gtS2pcpquZaF0beP3Zs4o8clcUuqM5ZIi9AxlsUcnKHs++6ihjy8ObDXAxk=
2022-12-02 10:18:02 +01:00
2022-02-02 17:38:21 +01:00
---
kind: pipeline
type: docker
name: prod
2024-02-19 12:33:50 +01:00
clone:
2024-02-19 15:00:54 +01:00
disable: true
2024-02-19 12:33:50 +01:00
2022-02-02 17:38:21 +01:00
steps:
2024-02-19 15:00:54 +01:00
- name: clone
image: alpine/git
commands:
- git clone --recursive $DRONE_REPO_LINK .
volumes:
- name: source
path: /drone/src/
2022-02-02 17:38:21 +01:00
- name: install submodule
image: drone/git
commands:
- git submodule update --init
- name: install npm
image: node:current-alpine
2022-02-03 11:03:23 +01:00
volumes:
- name: hugo-theme-lowtech_node_modules
path: /drone/src/themes/hugo-theme-lowtech/node_modules
2022-02-02 17:38:21 +01:00
environment:
DIRECTUS_URL:
from_secret: DIRECTUS_URL
DIRECTUS_TOKEN:
from_secret: DIRECTUS_TOKEN
commands:
- (cd themes/hugo-theme-lowtech && npm i)
- node scripts/directus-to-markdown/index.js
- name: build website
2024-02-19 11:48:11 +01:00
image: hugomods/hugo:base-0.121.1
volumes:
- name: hugo-resources
path: /drone/src/resources
2022-02-02 17:38:21 +01:00
commands:
- hugo --minify --environment production
- name: typo
image: node:current-alpine
2022-02-03 11:03:23 +01:00
volumes:
- name: hugo-theme-lowtech_node_modules
path: /drone/src/themes/hugo-theme-lowtech/node_modules
2022-02-02 17:38:21 +01:00
commands:
- node themes/hugo-theme-lowtech/scripts/typo
2022-12-02 10:18:02 +01:00
- name: deploy
2024-02-19 11:48:11 +01:00
image: hugomods/hugo:base-0.121.1
2022-12-02 10:18:02 +01:00
environment:
AWS_ACCESS_KEY_ID:
from_secret: PRODUCTION_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: PRODUCTION_AWS_SECRET_ACCESS_KEY
commands:
- hugo deploy --environment production
- name: notify
image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f
settings:
homeserver: https://converser.eu
roomid: "QwOITmkKxRJJyCSDOZ:converser.eu"
userid: "resilien:converser.eu"
accesstoken:
from_secret: MATRIX_ACCESSTOKEN
when:
status: [ failure ]
2022-02-03 11:03:23 +01:00
volumes:
- name: hugo-theme-lowtech_node_modules
host:
path: /tmp/drone/cache/weko/cremeaux/themes/hugo-theme-lowtech
- name: hugo-resources
host:
path: /tmp/drone/cache/weko/cremeaux/resources
2024-02-19 15:00:54 +01:00
- name: source
host:
path: /tmp/drone/cache/weko/cremeaux/source
2022-02-02 17:38:21 +01:00
---
kind: pipeline
type: docker
name: staging
2024-02-19 15:00:54 +01:00
clone:
disable: true
2022-02-02 17:38:21 +01:00
steps:
2024-02-19 15:00:54 +01:00
- name: clone
image: alpine/git
commands:
- git clone --recursive $DRONE_REPO_LINK .
volumes:
- name: source
path: /drone/src/
2022-02-02 17:38:21 +01:00
- name: install submodule
image: drone/git
commands:
- git submodule update --init
- name: install npm
image: node:current-alpine
2022-02-03 11:03:23 +01:00
volumes:
- name: hugo-theme-lowtech_node_modules
path: /drone/src/themes/hugo-theme-lowtech/node_modules
2022-02-02 17:38:21 +01:00
environment:
DIRECTUS_URL:
from_secret: DIRECTUS_URL
DIRECTUS_TOKEN:
from_secret: DIRECTUS_TOKEN
commands:
- (cd themes/hugo-theme-lowtech && npm i)
- DRAFT=true node scripts/directus-to-markdown/staging.js
2022-02-02 17:38:21 +01:00
- name: build website
2022-12-02 10:18:02 +01:00
image: klakegg/hugo:0.101.0-ext-debian-ci
2024-02-19 11:48:11 +01:00
volumes:
- name: hugo-resources
path: /drone/src/resources
2022-02-02 17:38:21 +01:00
commands:
- hugo --minify --buildDrafts --buildFuture --environment staging
- name: typo
image: node:current-alpine
2022-02-03 11:03:23 +01:00
volumes:
- name: hugo-theme-lowtech_node_modules
path: /drone/src/themes/hugo-theme-lowtech/node_modules
2022-02-02 17:38:21 +01:00
commands:
- node themes/hugo-theme-lowtech/scripts/typo
2022-12-02 10:18:02 +01:00
- name: deploy
image: klakegg/hugo:0.101.0-ext-debian-ci
environment:
AWS_ACCESS_KEY_ID:
from_secret: STAGING_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: STAGING_AWS_SECRET_ACCESS_KEY
commands:
- hugo deploy --environment staging
2022-02-03 11:03:23 +01:00
volumes:
- name: hugo-theme-lowtech_node_modules
host:
path: /tmp/drone/cache/weko/staging.cremeaux/themes/hugo-theme-lowtech
- name: hugo-resources
host:
path: /tmp/drone/cache/weko/staging.cremeaux/resources
2024-02-19 15:00:54 +01:00
- name: source
host:
path: /tmp/drone/cache/weko/staging.cremeaux/source