feat: Add ci with deploy
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Simon 2023-05-22 15:49:48 +02:00
parent 17701eb026
commit fc6da10364
2 changed files with 57 additions and 0 deletions

52
.drone.yml Normal file
View File

@ -0,0 +1,52 @@
---
# drone encrypt ResiLien/loi_re $AWS_ACCESS_KEY_ID
kind: secret
name: AWS_ACCESS_KEY_ID
data: 7xDOhroFzhF9AMnLnteYd+UBBmzSvgNW1nlhSZEoNMEzfL/E4MTykmgHKdQIPg+tNC7gRfz3
---
# drone encrypt ResiLien/loi_re $AWS_SECRET_ACCESS_KEY
kind: secret
name: AWS_SECRET_ACCESS_KEY
data: 9haqlgRCJ4W/wqmHVpJLOohv8kEQ+0hm83oECYcBpy7vdPoxT5vBQBFGpDnwenIbYX+7LNoJRl76E6mv1Q7olgxJh6DZtzCA9/00+LlH35DSVpWfqAYkRSdq6lo=
---
kind: pipeline
type: docker
name: production
steps:
- name: install npm
image: node:current-alpine
environment:
AWS_ACCESS_KEY_ID:
from_secret: AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: AWS_SECRET_ACCESS_KEY
volumes:
- name: assets
path: /drone/src/node_modules
commands:
- npm install --ignore-scripts
- npm run test
- 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: assets
host:
path: /tmp/drone/cache/ResiLien/loi_re/node_modules
- name: hugo-resources
host:
path: /tmp/drone/cache/ResiLien/loi_re/resources

View File

@ -1 +1,6 @@
canonifyURLs = false canonifyURLs = false
deployment:
targets:
- name: production
URL: s3://loi.re?endpoint=https://s3.garage.resilien.cloud&disableSSL=true&s3ForcePathStyle=true&region=garage