---
# drone encrypt ResiLien/diapos.resilien.fr $AWS_ACCESS_KEY_ID
kind: secret
name: PRODUCTION_AWS_ACCESS_KEY_ID
data: peLWdXK9rRiMRBw2NBvySOhPLgHnvUFhjOVba5TU/EO7RtBehpYHgM2xKp0vGtBpSLmOtb58

---
# drone encrypt ResiLien/diapos.resilien.fr $AWS_SECRET_ACCESS_KEY
kind: secret
name: PRODUCTION_AWS_SECRET_ACCESS_KEY
data: PekHO+HCtsC8nqfLHGqYwMbo5NEiEVMEYJaYExmf0kr7QEtvqqXQlNtobzY820BWP66g4uUe/tz0RNcZlRBb+vlNLemvvAdNO5s4elrTLNOXan92rRbgJzSegkw=

---
kind: pipeline
type: docker
name: prod

platform:
  os: linux
  arch: arm64

steps:
- name: install submodule
  image: drone/git
  commands:
  - git submodule update --init

- name: build website
  image: klakegg/hugo:0.115.2-ext-debian-ci
  commands:
    - hugo --minify

- name: deploy
  image: klakegg/hugo:0.115.2-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

trigger:
  event:
    - push
  branch:
    - main
