feat: Mise à jour automatique de staging
This commit is contained in:
68
.drone.yml
68
.drone.yml
@ -31,7 +31,7 @@ data: 1aojESEVwAY0jmHQfpWt5bGbbnMtFiv6mQMEQjC368oJZeMSFPTZL9/mTQAAqSbEHyEHV1r19H
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
name: prod
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
@ -93,3 +93,69 @@ volumes:
|
||||
- name: hugo-theme-lowtech_node_modules
|
||||
host:
|
||||
path: /tmp/drone/cache/weko/lestoitsduval/themes/hugo-theme-lowtech
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: staging
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: arm64
|
||||
|
||||
steps:
|
||||
- name: install submodule
|
||||
image: drone/git
|
||||
commands:
|
||||
- git config --global http.sslverify false
|
||||
- git submodule update --init
|
||||
|
||||
- name: install npm
|
||||
image: node:current-alpine
|
||||
volumes:
|
||||
- name: hugo-theme-lowtech_node_modules
|
||||
path: /drone/src/themes/hugo-theme-lowtech/node_modules
|
||||
environment:
|
||||
DIRECTUS_URL:
|
||||
from_secret: DIRECTUS_URL
|
||||
DIRECTUS_TOKEN:
|
||||
from_secret: DIRECTUS_TOKEN
|
||||
commands:
|
||||
- (cd themes/hugo-theme-lowtech && npm i)
|
||||
- DRAFT=true node scripts/directus-to-markdown/index.js
|
||||
|
||||
- name: build website
|
||||
image: jakejarvis/hugo-extended
|
||||
commands:
|
||||
- hugo --minify --buildDrafts --buildFuture --environment staging
|
||||
|
||||
- name: typo
|
||||
image: node:current-alpine
|
||||
volumes:
|
||||
- name: hugo-theme-lowtech_node_modules
|
||||
path: /drone/src/themes/hugo-theme-lowtech/node_modules
|
||||
commands:
|
||||
- node themes/hugo-theme-lowtech/scripts/typo
|
||||
|
||||
- name: push docker image on registry
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
from_secret: REGISTRY_USER
|
||||
password:
|
||||
from_secret: REGISTRY_PASSWORD
|
||||
repo: registry.weko.io/lestoitsduval
|
||||
registry: registry.weko.io
|
||||
tags:
|
||||
- staging
|
||||
|
||||
image_pull_secrets:
|
||||
- REGISTRY_CONFIG
|
||||
|
||||
volumes:
|
||||
- name: hugo-theme-directus-import_node_modules
|
||||
host:
|
||||
path: /tmp/drone/cache/weko/lestoitsduval/themes/hugo-theme-directus-import
|
||||
- name: hugo-theme-lowtech_node_modules
|
||||
host:
|
||||
path: /tmp/drone/cache/weko/lestoitsduval/themes/hugo-theme-lowtech
|
||||
|
Reference in New Issue
Block a user