139 lines
3.4 KiB
YAML
139 lines
3.4 KiB
YAML
---
|
|
# drone encrypt weko/weko.io $AWS_ACCESS_KEY_ID
|
|
kind: secret
|
|
name: STAGING_AWS_ACCESS_KEY_ID
|
|
data: WtVy8Op//nxf80WqKrVBUNucUohSNdfb+a6xBheoTJSktMo1R+MVj6vSsnyzRfeIjEX6oKBf
|
|
|
|
---
|
|
# drone encrypt weko/weko.io $AWS_SECRET_ACCESS_KEY
|
|
kind: secret
|
|
name: STAGING_AWS_SECRET_ACCESS_KEY
|
|
data: rrpzP1MZMKywkN1OppC9UaeLR1Zaa+Z9weQrduwUWX7YdSdwOKjxoYYRncV9leU8r9NGnJlIBtJaRA2I+FXPg/7q4ZhppAscDfcNxe1sug75Ni3exvYXeC0pbsU=
|
|
|
|
---
|
|
# drone encrypt weko/weko.io $AWS_ACCESS_KEY_ID
|
|
kind: secret
|
|
name: PRODUCTION_AWS_ACCESS_KEY_ID
|
|
data: hnpqmMR4M/j7dptGaUYX/OK/5zHRn2wsnorAwcakt76cl4AP0+so0rSqYcdVA05K8ER4PAkO
|
|
|
|
---
|
|
# drone encrypt weko/weko.io $AWS_SECRET_ACCESS_KEY
|
|
kind: secret
|
|
name: PRODUCTION_AWS_SECRET_ACCESS_KEY
|
|
data: NeDUFPKQazc+G7tILfKy4iNTildFBV3oPPn93NyIpu88xtQevk+Crg7km0z0yLevyTU//fkZ6fA9xw3bqWz7raSihzYn7V5TmStS57sykSglxWr0uPXkMazEKhg=
|
|
|
|
---
|
|
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
|
|
commands:
|
|
- (cd themes/hugo-theme-lowtech && npm i)
|
|
|
|
- name: build website
|
|
image: klakegg/hugo:0.107.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.107.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 ]
|
|
|
|
trigger:
|
|
event:
|
|
- push
|
|
branch:
|
|
- main
|
|
|
|
volumes:
|
|
- name: hugo-theme-lowtech_node_modules
|
|
host:
|
|
path: /tmp/drone/cache/weko/weko_io/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
|
|
commands:
|
|
- (cd themes/hugo-theme-lowtech && npm i)
|
|
|
|
- name: build website
|
|
image: klakegg/hugo:0.107.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.107.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
|
|
|
|
trigger:
|
|
event:
|
|
- push
|
|
|
|
volumes:
|
|
- name: hugo-theme-lowtech_node_modules
|
|
host:
|
|
path: /tmp/drone/cache/weko/weko_io/themes/hugo-theme-lowtech
|