From 18852b9ce9540488d8370ded091ea9644c289ebd Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Sun, 15 May 2022 22:28:34 +0300 Subject: [PATCH] test --- .drone.yml | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..d93b8c6 --- /dev/null +++ b/.drone.yml @@ -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 \ No newline at end of file