2021-11-17 22:45:32 +01:00
|
|
|
---
|
|
|
|
# drone encrypt weko/lestoitsduval $DIRECTUS_URL
|
|
|
|
kind: secret
|
|
|
|
name: DIRECTUS_URL
|
2022-01-27 17:51:50 +01:00
|
|
|
data: hYUC351igGt4WLCCbtrT1R3szBAuzdEv/n1J6onJJRQUTLZ8v4Hj/wysho0smBsASoZv/hzdZrPRy0gi
|
2021-11-17 22:45:32 +01:00
|
|
|
|
|
|
|
---
|
2022-01-27 17:51:50 +01:00
|
|
|
# drone encrypt weko/lestoitsduval $DIRECTUS_TOKEN
|
2021-11-17 22:45:32 +01:00
|
|
|
kind: secret
|
2022-01-27 17:51:50 +01:00
|
|
|
name: DIRECTUS_TOKEN
|
|
|
|
data: 1aojESEVwAY0jmHQfpWt5bGbbnMtFiv6mQMEQjC368oJZeMSFPTZL9/mTQAAqSbEHyEHV1r19Hf/k/Oq
|
2021-11-17 22:45:32 +01:00
|
|
|
|
2022-11-28 10:30:23 +01:00
|
|
|
---
|
|
|
|
# drone encrypt weko/lestoitsduval $AWS_ACCESS_KEY_ID
|
|
|
|
kind: secret
|
|
|
|
name: STAGING_AWS_ACCESS_KEY_ID
|
|
|
|
data: 4jsEHoEytCQ2pikznPCWgo+cG7TEhg3W548jTPRmg+C+VplsyCRxEWY77zkZIxMN3ytPrZhs
|
|
|
|
|
|
|
|
---
|
|
|
|
# drone encrypt weko/lestoitsduval $AWS_SECRET_ACCESS_KEY
|
|
|
|
kind: secret
|
|
|
|
name: STAGING_AWS_SECRET_ACCESS_KEY
|
|
|
|
data: kIoG1rr56kvo8Uw7TpVZswp30yAF8iom/uu1dOwy9+YF1y1WiJNi4K2x1JkgOWd/u7vtrog60BBhD7gR65qhN0+C2dgs40u6xl2YJ/C6WITqacu4OP6DG38RQw4=
|
|
|
|
|
|
|
|
---
|
|
|
|
# drone encrypt weko/lestoitsduval $AWS_ACCESS_KEY_ID
|
|
|
|
kind: secret
|
|
|
|
name: PRODUCTION_AWS_ACCESS_KEY_ID
|
|
|
|
data: gkyG257s/FxB7QnSA13qzWBMJqP7foYUtRgu9yQB3ZRHDJmCm/frofIX1kkU+Nce987rDpUj
|
|
|
|
|
|
|
|
---
|
|
|
|
# drone encrypt weko/lestoitsduval $AWS_SECRET_ACCESS_KEY
|
|
|
|
kind: secret
|
|
|
|
name: PRODUCTION_AWS_SECRET_ACCESS_KEY
|
|
|
|
data: 1oL1XSfD86/BR+NA2XyhGDGUmd9+4d7Br1IFcP/63hekgtzyPsXPKZuy30ruFJisJsskl/1+gs2GJ+XNLcdFJzMpx7BwKBrLkCBS/pQy2xvXbUzJPd6HIiSyrhY=
|
|
|
|
|
2021-11-17 22:45:32 +01:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2022-01-31 08:59:01 +01:00
|
|
|
name: prod
|
2021-11-17 22:45:32 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: install submodule
|
|
|
|
image: drone/git
|
|
|
|
commands:
|
|
|
|
- git submodule update --init
|
|
|
|
|
|
|
|
- name: install npm
|
|
|
|
image: node:current-alpine
|
|
|
|
volumes:
|
|
|
|
- name: hugo-theme-lowtech_node_modules
|
|
|
|
path: /drone/src/themes/hugo-theme-lowtech/node_modules
|
|
|
|
environment:
|
|
|
|
DIRECTUS_URL:
|
|
|
|
from_secret: DIRECTUS_URL
|
2022-01-27 17:51:50 +01:00
|
|
|
DIRECTUS_TOKEN:
|
|
|
|
from_secret: DIRECTUS_TOKEN
|
2021-11-17 22:45:32 +01:00
|
|
|
commands:
|
|
|
|
- (cd themes/hugo-theme-lowtech && npm i)
|
2022-01-27 17:51:50 +01:00
|
|
|
- node scripts/directus-to-markdown/index.js
|
2021-11-17 22:45:32 +01:00
|
|
|
|
|
|
|
- name: build website
|
2022-11-28 10:51:11 +01:00
|
|
|
image: klakegg/hugo:0.101.0-ext-debian-ci
|
2021-11-17 22:45:32 +01:00
|
|
|
commands:
|
|
|
|
- hugo --minify --environment production
|
|
|
|
|
|
|
|
- name: typo
|
|
|
|
image: node:current-alpine
|
|
|
|
volumes:
|
|
|
|
- name: hugo-theme-lowtech_node_modules
|
|
|
|
path: /drone/src/themes/hugo-theme-lowtech/node_modules
|
|
|
|
commands:
|
|
|
|
- node themes/hugo-theme-lowtech/scripts/typo
|
|
|
|
|
2022-11-28 10:30:23 +01:00
|
|
|
- name: deploy
|
|
|
|
image: klakegg/hugo:0.101.0-ext-debian-ci
|
|
|
|
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:07:40 +01:00
|
|
|
- name: notify
|
2023-01-13 14:19:42 +01:00
|
|
|
image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f
|
2023-01-11 18:07:40 +01:00
|
|
|
settings:
|
|
|
|
homeserver: https://converser.eu
|
2023-01-13 14:19:42 +01:00
|
|
|
roomid: "QwOITmkKxRJJyCSDOZ:converser.eu"
|
|
|
|
userid: "resilien:converser.eu"
|
2023-01-11 18:07:40 +01:00
|
|
|
accesstoken:
|
2023-01-13 14:19:42 +01:00
|
|
|
from_secret: MATRIX_ACCESSTOKEN
|
2023-01-11 18:07:40 +01:00
|
|
|
when:
|
|
|
|
status: [ failure ]
|
|
|
|
|
2021-11-17 22:45:32 +01:00
|
|
|
volumes:
|
|
|
|
- name: hugo-theme-lowtech_node_modules
|
|
|
|
host:
|
|
|
|
path: /tmp/drone/cache/weko/lestoitsduval/themes/hugo-theme-lowtech
|
2022-01-31 08:59:01 +01:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: staging
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: install submodule
|
|
|
|
image: drone/git
|
|
|
|
commands:
|
|
|
|
- git submodule update --init
|
|
|
|
|
|
|
|
- name: install npm
|
|
|
|
image: node:current-alpine
|
|
|
|
volumes:
|
|
|
|
- name: hugo-theme-lowtech_node_modules
|
|
|
|
path: /drone/src/themes/hugo-theme-lowtech/node_modules
|
|
|
|
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/index.js
|
|
|
|
|
|
|
|
- name: build website
|
2022-11-28 10:51:11 +01:00
|
|
|
image: klakegg/hugo:0.101.0-ext-debian-ci
|
2022-01-31 08:59:01 +01:00
|
|
|
commands:
|
|
|
|
- hugo --minify --buildDrafts --buildFuture --environment staging
|
|
|
|
|
|
|
|
- name: typo
|
|
|
|
image: node:current-alpine
|
|
|
|
volumes:
|
|
|
|
- name: hugo-theme-lowtech_node_modules
|
|
|
|
path: /drone/src/themes/hugo-theme-lowtech/node_modules
|
|
|
|
commands:
|
|
|
|
- node themes/hugo-theme-lowtech/scripts/typo
|
|
|
|
|
2022-11-28 10:30:23 +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-01-31 08:59:01 +01:00
|
|
|
volumes:
|
|
|
|
- name: hugo-theme-lowtech_node_modules
|
|
|
|
host:
|
|
|
|
path: /tmp/drone/cache/weko/lestoitsduval/themes/hugo-theme-lowtech
|