test
All checks were successful
continuous-integration/drone Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
Maxim Slipenko 2022-05-15 22:28:34 +03:00
parent 51adcae75d
commit 18852b9ce9
Signed by: Maks1mS
GPG Key ID: 7461AF39A8705FB8

149
.drone.yml Normal file
View File

@ -0,0 +1,149 @@
---
kind: pipeline
type: docker
name: production
platform:
os: linux
arch: arm64
clone:
disable: true
steps:
- name: clone
image: alpine/git
commands:
- git clone $WIKI_CONTENT content
- git clone $DRONE_GIT_HTTP_URL site
- cd site
- git checkout $DRONE_COMMIT
environment:
WIKI_CONTENT: https://git.slipenko.com/wiki/content
- name: restore-cache
image: plugins/volume-cache
volumes:
- name: cache
path: /cache
settings:
restore: true
mount:
- ./site/node_modules
- name: build
image: node:14-alpine
commands:
- cd site
- npm install
- npm run build
- name: deploy
image: maks1ms/vercel
commands:
- cd site
- vercel --confirm --prod --token $VERCEL_TOKEN
environment:
VERCEL_TOKEN:
from_secret: vercel_token
VERCEL_ORG_ID:
from_secret: vercel_org_id
VERCEL_PROJECT_ID:
from_secret: vercel_project_id
- name: rebuild-cache
image: plugins/volume-cache
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount:
- ./site/node_modules
volumes:
- name: cache
host:
path: /tmp/cache
trigger:
branch:
- master
event:
- push
- custom
---
kind: pipeline
type: docker
name: development
platform:
os: linux
arch: arm64
clone:
disable: true
steps:
- name: clone
image: alpine/git
commands:
- git clone $WIKI_CONTENT content
- git clone $DRONE_GIT_HTTP_URL site
- cd site
- git checkout $DRONE_COMMIT
environment:
WIKI_CONTENT: https://git.slipenko.com/wiki/content
- name: restore-cache
image: plugins/volume-cache
volumes:
- name: cache
path: /cache
settings:
restore: true
mount:
- ./site/node_modules
- name: build
image: node:14-alpine
commands:
- cd site
- npm install
- npm run build
- name: deploy
image: maks1ms/vercel
commands:
- cd site
- vercel --confirm --token $VERCEL_TOKEN
environment:
VERCEL_TOKEN:
from_secret: vercel_token
VERCEL_ORG_ID:
from_secret: vercel_org_id
VERCEL_PROJECT_ID:
from_secret: vercel_project_id
- name: rebuild-cache
image: plugins/volume-cache
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount:
- ./site/node_modules
volumes:
- name: cache
host:
path: /tmp/cache
trigger:
branch:
exclude:
- master