--- 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 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:16-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