kind: pipeline
type: docker
name: default
steps:
- name: restore-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
restore: true
mount:
- ./node_modules
- name: install depends
image: node:18
commands:
- npm install
- name: rebuild-cache
rebuild: true
# Other branches
- name: test
when:
branch:
exclude:
- main
- npm run lint
# Main branches
- name: docker
image: plugins/docker
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
repo: fascinated/beatsaber-overlay
tags: latest
host:
path: /tmp/cache
# deploy:
# image: alpine:latest
# stage: deploy
# tags:
# script:
# - chmod og= $ID_RSA
# - apk update && apk add openssh-client
# - ssh -i $ID_RSA -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "cd /home/overlay && docker compose pull && docker compose up -d && docker image prune -f"
# environment:
# name: production
# url: https://bs-overlay.fascinated.cc
# only:
# - main