
---
# drone encrypt P4Pillon/avecsante.app $AWS_ACCESS_KEY_ID
kind: secret
name: AWS_ACCESS_KEY_ID
data: E8jzEjG64MRSoRO6g5CSQnNmpnP6Ck2EwIhPNwyVuGudzFGT88UbQ8gppUV9vF9vAoKQ/NNC

---
# drone encrypt P4Pillon/avecsante.app $AWS_SECRET_ACCESS_KEY
kind: secret
name: AWS_SECRET_ACCESS_KEY
data: 6Vvc4kHWpQlx+2MOd8V4MLFXjg5EhIwDijQoQIdkhjwXaoIHjUlQdfSqidkE1JYKHSoL7k3/m/NKT4l+oTXv6MVDWcm2mWX5pnIA08PDHifgMEVDNUdgdbm3qpo=

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

steps:

- name: install npm
  image: node:current-alpine
  volumes:
  - name: node_modules
    path: /drone/src/node_modules
  - name: hugo-resources
    path: /drone/src/resources
  environment:
    AWS_ACCESS_KEY_ID:
      from_secret: AWS_ACCESS_KEY_ID
    AWS_SECRET_ACCESS_KEY:
      from_secret: AWS_SECRET_ACCESS_KEY
  commands:
  - npm i
  - npm run build
  - npm run deploy

# - 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 ]

volumes:
- name: node_modules
  host:
    path: /tmp/drone/cache/p4pillon/avecsante.app/node_modules
- name: hugo-resources
  host:
    path: /tmp/drone/cache/weko/avecsante.app/resources
