---
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:16-alpine
- npm install
- npm run build
- name: deploy
image: maks1ms/vercel
- vercel --confirm --prod --token $VERCEL_TOKEN
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
rebuild: true
host:
path: /tmp/cache
trigger:
branch:
- master
event:
- push
- custom
name: development
- vercel --confirm --token $VERCEL_TOKEN
exclude: