From fbe490087b784cc4ac93522632411b33224debb3 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 8 Aug 2021 18:06:40 +0200 Subject: [PATCH] WIP --- .drone.jsonnet | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index f899bfb..a1d7c8e 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -29,13 +29,17 @@ local Pipeline(isDev) = { { name: "deploy", commands: [ - "nix develop -c make deploy", + "nix run github:ambroisie/nix-config#drone-scp", ], - environment: { - SSH_HOST: { from_secret: "ssh_host" }, - SSH_TARGET: { from_secret: "ssh_target" + if isDev then "_dev" else "" }, - SSH_USER: { from_secret: "ssh_user" }, - SSH_KEY: { from_secret: "ssh_key" }, + settings: { + source: "public/*", + strip_components: 1, # Remove 'public/' suffix from file paths + rm: true, # Remove previous files from target directory + host: { from_secret: "ssh_host" }, + target: { from_secret: "ssh_target" + if isDev then "_dev" else "" }, + username: { from_secret: "ssh_user" }, + key: { from_secret: "ssh_key" }, + port: { from_secret: "ssh_port" }, }, }, {