lestoitsduval/.drone.yml

108 lines
3.0 KiB
YAML

---
# drone encrypt weko/lestoitsduval $REGISTRY_PASSWORD
kind: secret
name: REGISTRY_PASSWORD
data: RrJX1Ir1Fqp83P43po3iQh4RE+SULN060LDe/PkEYw+mxPLrdDREEoQNKfh8RvAMjvocNojY9OuxXaZSpC72GOpi8qzslnHAbHhQfCX/
---
# drone encrypt weko/lestoitsduval $REGISTRY_USER
kind: secret
name: REGISTRY_USER
data: fyPAM/EECUhDI5XGhj3RbQWgzbGija2DAwepuAWmnEx1+A==
---
# drone encrypt weko/lestoitsduval "{\"auths\":{\"https://registry.weko.io\":{\"auth\":\"$(echo -n "$REGISTRY_USER:$REGISTRY_PASSWORD" | base64)\",\"email\":\"$REGISTRY_USER\"}}}"
kind: secret
name: REGISTRY_CONFIG
data: NsJ77R/8TEmyCM7h6OXkOeGhKAdctofukKezjfjIMGaBv5aGYN4CKYCIBlLsBWfFvMb+0SIDqrExyLw4i5dFWfDepwdNacJXNRmjIEkxuaJmvGxV8BZpcof28LjhB4psKrKjmTFpGioS3kG1MRfnljD/AlwckUd6S4KYNfGgJW0hQccxbamW9M0tqagPddayGEDghwxUfzqQk937rmOV7ngI+mon9f4DCWVA
---
# drone encrypt weko/lestoitsduval $DIRECTUS_URL
kind: secret
name: DIRECTUS_URL
data: pPaOgtpSRFhEZ6zq61OoN+gYxZ6nzg+FlmFYEhUq/GLoFXTwA3i+Yci7ZrwJUmhOpLtG
---
# drone encrypt weko/lestoitsduval $DIRECTUS_EMAIL
kind: secret
name: DIRECTUS_EMAIL
data: Egj2gQqz40mbxx9tFc7bfTOiUc36Dch+2Y4RjVEt9qpoL1y5d5KEpSE=
---
# drone encrypt weko/lestoitsduval $DIRECTUS_PASSWORD
kind: secret
name: DIRECTUS_PASSWORD
data: TC0fUdQ7NvL7Qri7SuqTK6JC9zbX0xVSyndHl/zbFlecARlc7Yzru65OO1fvf1VQxSejIVlPcyorZRiHepUeTnt0nEXTgDmO
---
kind: pipeline
type: docker
name: default
platform:
os: linux
arch: arm64
steps:
- name: install submodule
image: drone/git
commands:
- git config --global http.sslverify false
- git submodule update --init
- name: install npm
image: node:current-alpine
volumes:
- name: hugo-theme-directus-import_node_modules
path: /drone/src/themes/hugo-theme-directus-import/node_modules
- name: hugo-theme-lowtech_node_modules
path: /drone/src/themes/hugo-theme-lowtech/node_modules
environment:
DIRECTUS_URL:
from_secret: DIRECTUS_URL
DIRECTUS_EMAIL:
from_secret: DIRECTUS_EMAIL
DIRECTUS_PASSWORD:
from_secret: DIRECTUS_PASSWORD
commands:
- (cd themes/hugo-theme-lowtech && npm i)
- (cd themes/hugo-theme-directus-import && npm i)
- node themes/hugo-theme-directus-import/import.js
- name: build website
image: jakejarvis/hugo-extended
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: push docker image on registry
image: plugins/docker
settings:
username:
from_secret: REGISTRY_USER
password:
from_secret: REGISTRY_PASSWORD
repo: registry.weko.io/lestoitsduval
registry: registry.weko.io
tags:
- latest
image_pull_secrets:
- REGISTRY_CONFIG
volumes:
- name: hugo-theme-directus-import_node_modules
host:
path: /tmp/drone/cache/weko/lestoitsduval/themes/hugo-theme-directus-import
- name: hugo-theme-lowtech_node_modules
host:
path: /tmp/drone/cache/weko/lestoitsduval/themes/hugo-theme-lowtech