drone.io plugin: Atomically "moves" a directory.
252
Atomically "moves" a directory.
Use with drone as plugin, as in:
kind: pipeline
name: website
steps:
- name: prepare
image: node
commands:
- npm install --production-only
- name: generate
image: jekyll/minimal
commands:
- chown -R jekyll:jekyll .
- jekyll build
- name: deploy
image: herbysk/drone-plugin-mvdir
settings:
source: _site
target: /var/amber-lang.net/static
volumes:
- name: hosting
path: /var/amber-lang.net
when:
branch:
- gh-pages
repo:
- amber/amber-website
node:
amber_web: "true"
volumes:
- name: hosting
host:
path: /mnt/storage/VOLUMES/amber-lang.net
The trick is to use symlinks (the source must be a directory, the target will be a symlink) and atomic mv -T oldsymlink newsymlink.
You must have write permission in source parent as well as target parent.
Content type
Image
Digest
Size
25.5 MB
Last updated
about 7 years ago
docker pull herbysk/drone-plugin-mvdir