2022-02-02 17:38:21 +01:00
|
|
|
---
|
2023-02-24 17:52:31 +01:00
|
|
|
# drone encrypt Weko/cremeaux $DIRECTUS_URL
|
2022-02-02 17:38:21 +01:00
|
|
|
kind: secret
|
|
|
|
name: DIRECTUS_URL
|
2023-02-24 17:52:31 +01:00
|
|
|
data: RDzjslPRJRwgL9qhzcq3wVeCN91hAbO6vwd1XFCJ/G4Pm44iASdNjdZ3QfGja6pg1TJ1FSmZZg==
|
2022-02-02 17:38:21 +01:00
|
|
|
|
|
|
|
---
|
2023-02-24 17:52:31 +01:00
|
|
|
# drone encrypt Weko/cremeaux $DIRECTUS_TOKEN
|
2022-02-02 17:38:21 +01:00
|
|
|
kind: secret
|
|
|
|
name: DIRECTUS_TOKEN
|
2023-02-24 17:52:31 +01:00
|
|
|
data: NHpX9VNOhcDrS4feXOVi1sL2K44yvdGk9m4CUlpUImqpJGZ8gPQDX+0pffXjhkv6EerRaUsYA6cVNZvY
|
2022-02-02 17:38:21 +01:00
|
|
|
|
2022-12-02 10:18:02 +01:00
|
|
|
---
|
2023-02-24 17:52:31 +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
|
2023-02-24 17:52:31 +01:00
|
|
|
data: E8jzEjG64MRSoRO6g5CSQnNmpnP6Ck2EwIhPNwyVuGudzFGT88UbQ8gppUV9vF9vAoKQ/NNC
|
2022-12-02 10:18:02 +01:00
|
|
|
|
|
|
|
---
|
2023-02-24 17:52:31 +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
|
2023-02-24 17:52:31 +01:00
|
|
|
data: 6Vvc4kHWpQlx+2MOd8V4MLFXjg5EhIwDijQoQIdkhjwXaoIHjUlQdfSqidkE1JYKHSoL7k3/m/NKT4l+oTXv6MVDWcm2mWX5pnIA08PDHifgMEVDNUdgdbm3qpo=
|
2022-12-02 10:18:02 +01:00
|
|
|
|
|
|
|
---
|
2023-02-24 17:52:31 +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
|
2023-02-24 17:52:31 +01:00
|
|
|
data: rQ4HtHyB7cMd024W6/vIeDNSHb5oHunINlq5Zvg/U1qWp/d0XnmgO0ArOg43A+XTyX5bHmFJ
|
2022-12-02 10:18:02 +01:00
|
|
|
|
|
|
|
---
|
2023-02-24 17:52:31 +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
|
2023-02-24 17:52:31 +01:00
|
|
|
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 .
|
2024-02-19 15:07:10 +01:00
|
|
|
# volumes:
|
|
|
|
# - name: source
|
|
|
|
# path: /drone/src/
|
2024-02-19 15:00:54 +01:00
|
|
|
|
2024-02-19 15:07:10 +01:00
|
|
|
# - name: install submodule
|
|
|
|
# image: drone/git
|
|
|
|
# commands:
|
|
|
|
# - git submodule update --init
|
2022-02-02 17:38:21 +01:00
|
|
|
|
|
|
|
- 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
|
|
|
|
|
2023-01-11 18:05:18 +01:00
|
|
|
- name: notify
|
2023-01-13 15:42:42 +01:00
|
|
|
image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f
|
2023-01-11 18:05:18 +01:00
|
|
|
settings:
|
|
|
|
homeserver: https://converser.eu
|
2023-01-13 15:42:42 +01:00
|
|
|
roomid: "QwOITmkKxRJJyCSDOZ:converser.eu"
|
|
|
|
userid: "resilien:converser.eu"
|
2023-01-11 18:05:18 +01:00
|
|
|
accesstoken:
|
2023-01-13 15:42:42 +01:00
|
|
|
from_secret: MATRIX_ACCESSTOKEN
|
2023-01-11 18:05:18 +01:00
|
|
|
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
|
2022-12-02 13:11:51 +01:00
|
|
|
- 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 .
|
2024-02-19 15:07:10 +01:00
|
|
|
# volumes:
|
|
|
|
# - name: source
|
|
|
|
# path: /drone/src/
|
|
|
|
|
|
|
|
# - name: install submodule
|
|
|
|
# image: drone/git
|
|
|
|
# commands:
|
|
|
|
# - git submodule update --init
|
2022-02-02 17:38:21 +01:00
|
|
|
|
|
|
|
- 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)
|
2023-07-13 00:25:35 +02:00
|
|
|
- DRAFT=true node scripts/directus-to-markdown/staging.js
|
2022-02-02 17:38:21 +01:00
|
|
|
|
|
|
|
- name: build website
|
2024-05-07 16:59:25 +02:00
|
|
|
image: hugomods/hugo:base-0.121.1
|
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
|
2024-05-07 16:59:25 +02:00
|
|
|
image: hugomods/hugo:base-0.121.1
|
2022-12-02 10:18:02 +01:00
|
|
|
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:
|
2023-02-25 11:38:28 +01:00
|
|
|
path: /tmp/drone/cache/weko/staging.cremeaux/themes/hugo-theme-lowtech
|
2022-12-02 13:11:51 +01:00
|
|
|
- name: hugo-resources
|
|
|
|
host:
|
2023-02-25 11:38:28 +01:00
|
|
|
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
|