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

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

61
.drone.yml Normal file
View File

@ -0,0 +1,61 @@
---
# 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
volumes:
- name: assets
path: /drone/src/node_modules
commands:
- npm install --ignore-scripts
- npm run test
- name: build website
image: jakejarvis/hugo-extended
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
- name: hugo-resources
path: /drone/src/resources
commands:
- hugo --gc --minify
- hugo 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,5 @@
canonifyURLs = false
[[deployment.targets]]
name = "production"
URL = "s3://loi.re?endpoint=https://s3.garage.resilien.cloud&disableSSL=true&s3ForcePathStyle=true&region=garage"