This repository has been archived on 2022-11-04. You can view files and clone it, but cannot push or open issues or pull requests.
site/.drone.yml

149 lines
2.3 KiB
YAML
Raw Permalink Normal View History

2022-05-15 22:28:34 +03:00
---
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
2022-09-30 16:17:08 +03:00
image: node:16-alpine
2022-05-15 22:28:34 +03:00
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
2022-09-30 16:17:08 +03:00
image: node:16-alpine
2022-05-15 22:28:34 +03:00
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