weko/.drone.yml

147 lines
3.5 KiB
YAML
Raw Normal View History

2022-12-05 15:02:52 +01:00
---
# 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
platform:
os: linux
arch: arm64
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
2022-12-05 15:23:02 +01:00
image: klakegg/hugo:0.107.0-ext-debian-ci
2022-12-05 15:02:52 +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
- name: deploy
2022-12-05 15:23:02 +01:00
image: klakegg/hugo:0.107.0-ext-debian-ci
2022-12-05 15:02:52 +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-16 12:28:30 +01:00
- 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-12-05 15:02:52 +01:00
trigger:
event:
- push
branch:
- main
volumes:
- name: hugo-theme-lowtech_node_modules
host:
2022-12-05 15:26:48 +01:00
path: /tmp/drone/cache/weko/weko_io/themes/hugo-theme-lowtech
2022-12-05 15:02:52 +01:00
---
kind: pipeline
type: docker
name: staging
platform:
os: linux
arch: arm64
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
2022-12-05 15:23:02 +01:00
image: klakegg/hugo:0.107.0-ext-debian-ci
2022-12-05 15:02:52 +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
- name: deploy
2022-12-05 15:23:02 +01:00
image: klakegg/hugo:0.107.0-ext-debian-ci
2022-12-05 15:02:52 +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
trigger:
event:
- push
volumes:
- name: hugo-theme-lowtech_node_modules
host:
2022-12-05 15:26:48 +01:00
path: /tmp/drone/cache/weko/weko_io/themes/hugo-theme-lowtech