annuaire/.drone.yml

66 lines
1.7 KiB
YAML

---
# drone encrypt P4Pillon/annuaire $AWS_ACCESS_KEY_ID
kind: secret
name: PRODUCTION_AWS_ACCESS_KEY_ID
data: 0IUteSqGsrOSbPu54RybAaOcyzylSai37G/tsf+0QM8zTHntuktsOlaz0nKrhou+Y/hprSsj
---
# drone encrypt P4Pillon/annuaire $AWS_SECRET_ACCESS_KEY
kind: secret
name: PRODUCTION_AWS_SECRET_ACCESS_KEY
data: fhJ+c8nL4nmprWrrEOkh4uhLpjEUEYUxoXZ5Y2DnGRjJ1Z6hfELrQgSUImV4PIqgrAs2kSQgV+ENfdYuPBfsvg6mapfnA9zBA7rNZIbqTgLGEfqI33eWZDeuZW8=
---
kind: pipeline
type: docker
name: prod
steps:
- name: Import
image: python:3
commands:
- (cd scripts && pip install -r requirements.txt)
- (cd scripts && python3 finess-clean.py)
- (cd scripts && python3 finess-sisa.py)
- name: install npm
image: node:current-alpine
volumes:
- name: node_modules
path: /drone/src/scripts/import-from-directus/node_modules
commands:
- (cd scripts/import-from-directus && npm i)
- (cd scripts/import-from-directus && node index.js)
- name: build website
image: klakegg/hugo:0.101.0-ext-debian-ci
commands:
- hugo --minify --environment production
- name: deploy
image: klakegg/hugo:0.101.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
- 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/annuaire/scripts/import-from-directus/node_modules