histoiredunpied/.drone.yml

81 lines
2.0 KiB
YAML
Raw Normal View History

2020-03-21 09:25:13 +01:00
---
2022-12-08 14:16:22 +01:00
# drone encrypt weko/histoiredunpied $AWS_ACCESS_KEY_ID
2020-03-21 09:25:13 +01:00
kind: secret
2022-12-08 14:16:22 +01:00
name: PRODUCTION_AWS_ACCESS_KEY_ID
data: /xI53R4q+LG5Hyo4m58pqTkwAtRXwRq81J4xdgjNrKIjsMdr9tZ+WQDU9UDlQ6AmbiVPgB03
2020-03-21 09:25:13 +01:00
---
2022-12-08 14:16:22 +01:00
# drone encrypt weko/histoiredunpied $AWS_SECRET_ACCESS_KEY
2020-03-21 09:25:13 +01:00
kind: secret
2022-12-08 14:16:22 +01:00
name: PRODUCTION_AWS_SECRET_ACCESS_KEY
data: s8r0O9MmAlItowihl8mpx5BfoBwpTngxnIjATbkwpBadx3K3vPoClO9f4I1sfRl8ANn84Jp8VioMynvNUyw1+283O0qmMtvLPm54KZ4fqh/pxJoT35lur/2hKug=
2020-03-24 11:22:05 +01:00
2020-03-17 11:20:11 +01:00
---
kind: pipeline
2020-03-17 11:29:10 +01:00
type: docker
2020-03-17 11:20:11 +01:00
name: default
2020-03-17 11:29:10 +01:00
platform:
os: linux
2020-05-21 17:40:49 +02:00
arch: arm64
2020-03-17 11:29:10 +01:00
2020-03-17 11:20:11 +01:00
steps:
2022-12-08 14:16:22 +01:00
- name: install submodule
image: drone/git
2020-03-17 11:29:10 +01:00
commands:
- git submodule update --init
2022-12-08 14:16:22 +01:00
- name: install npm
image: node:current-alpine
volumes:
- name: hugo-theme-lowtech_node_modules
path: /drone/src/themes/hugo-theme-lowtech/node_modules
- name: hugo-node_modules
path: /drone/src/node_modules
commands:
- npm i
2020-03-17 11:29:10 +01:00
- (cd themes/hugo-theme-lowtech && npm i)
2022-12-08 14:16:22 +01:00
- name: build website
image: klakegg/hugo:0.107.0-ext-debian-ci
commands:
- hugo --minify --environment production
- name: Typo + purgecss
image: node:current-alpine
volumes:
- name: hugo-theme-lowtech_node_modules
path: /drone/src/themes/hugo-theme-lowtech/node_modules
- name: hugo-node_modules
path: /drone/src/node_modules
commands:
- node themes/hugo-theme-lowtech/scripts/typo
- node_modules/.bin/purgecss --css public/css/*.css --content public/index.html --output public/css/
- 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
2020-03-17 11:29:10 +01:00
when:
branch:
- master
2022-12-08 14:16:22 +01:00
trigger:
event:
- push
branch:
- master
volumes:
- name: hugo-theme-lowtech_node_modules
host:
path: /tmp/drone/cache/weko/histoiredunpied_com/themes/hugo-theme-lowtech
- name: hugo-node_modules
host:
path: /tmp/drone/cache/weko/histoiredunpied_com/node_modules