153 lines
4.0 KiB
YAML
153 lines
4.0 KiB
YAML
---
|
|
# drone encrypt Weko/lestoitsduval $DIRECTUS_URL
|
|
kind: secret
|
|
name: DIRECTUS_URL
|
|
data: WFeCXHx+re9cQKwRLQK3JuV+9pdYoeg6lyfrEiu2L/wj/DGoZIFW3uJa/cvqyE+zkdk3+sHzgkRKWyfy
|
|
|
|
---
|
|
# drone encrypt Weko/lestoitsduval $DIRECTUS_TOKEN
|
|
kind: secret
|
|
name: DIRECTUS_TOKEN
|
|
data: tWWrvTUtMyHYUmEzPhLt7YStMHz0FJLLUixCWMFZzlIb957haQD+0HdOJju7pHIB31nSG7rhw1CJpU0U
|
|
|
|
---
|
|
# drone encrypt Weko/lestoitsduval $AWS_ACCESS_KEY_ID
|
|
kind: secret
|
|
name: STAGING_AWS_ACCESS_KEY_ID
|
|
data: UzmjtgckEa7n/8MsAjsJMMDOKjc95HN4MlDe94tB1Q2Kqa7xJV4gCKZU0soH3oU3uVVtmVoV
|
|
|
|
---
|
|
# drone encrypt Weko/lestoitsduval $AWS_SECRET_ACCESS_KEY
|
|
kind: secret
|
|
name: STAGING_AWS_SECRET_ACCESS_KEY
|
|
data: qNgQEXKnSdDaX5CPgMhMqWXASgIAajWK4WwVLYTvF6NN+e9yywpIDGgYouugcyYaNOeFGgPHpbP/Bxqzzm5657Q46Y88YL+Ql92bh23bXWm9iEbyjHp4sSi6T+4=
|
|
|
|
---
|
|
# drone encrypt Weko/lestoitsduval $AWS_ACCESS_KEY_ID
|
|
kind: secret
|
|
name: PRODUCTION_AWS_ACCESS_KEY_ID
|
|
data: 3fbWhRL4H2Gkx+Am6HxdcOYGE8ebvEM2ClvQDJnTw7eDpNCOnnV9C6Zr3hDe9jhJkkne5c/9
|
|
|
|
---
|
|
# drone encrypt Weko/lestoitsduval $AWS_SECRET_ACCESS_KEY
|
|
kind: secret
|
|
name: PRODUCTION_AWS_SECRET_ACCESS_KEY
|
|
data: BN5fuv8g7ZLCb3wV5uhkztskuvoG6VXG2LlBupt3YhrySV5xD1Glh+TrLDeICY6LDUYM6JBPpqnO6VBhl3xr2bGtUaz4NNHV7Lhms5Pge3YgD4/3LSjDs6EfLD4=
|
|
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: prod
|
|
|
|
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)
|
|
- node scripts/directus-to-markdown/index.js
|
|
|
|
- name: build website
|
|
image: klakegg/hugo:0.101.0-ext-debian-ci
|
|
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
|
|
|
|
- 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
|
|
|
|
- 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 ]
|
|
|
|
volumes:
|
|
- name: hugo-theme-lowtech_node_modules
|
|
host:
|
|
path: /tmp/drone/cache/weko/lestoitsduval/themes/hugo-theme-lowtech
|
|
|
|
---
|
|
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
|
|
image: klakegg/hugo:0.101.0-ext-debian-ci
|
|
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
|
|
|
|
- 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
|
|
|
|
volumes:
|
|
- name: hugo-theme-lowtech_node_modules
|
|
host:
|
|
path: /tmp/drone/cache/weko/staging.lestoitsduval/themes/hugo-theme-lowtech
|