From 90049627c35cc62cd3b62f50806b5206be9a9473 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 8 Aug 2021 18:17:23 +0200 Subject: [PATCH] WIP --- .drone.jsonnet | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index a1d7c8e..351ee4b 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -29,17 +29,18 @@ local Pipeline(isDev) = { { name: "deploy", commands: [ + "env", "nix run github:ambroisie/nix-config#drone-scp", ], - 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" }, + environment: { + SCP_SOURCE: "public/*", + SCP_STRIP_COMPONENTS: 1, # Remove 'public/' suffix from file paths + SCP_RM: true, # Remove previous files from target directory + SCP_HOST: { from_secret: "ssh_host" }, + SCP_TARGET: { from_secret: "ssh_target" + if isDev then "_dev" else "" }, + SCP_USERNAME: { from_secret: "ssh_user" }, + SCP_KEY: { from_secret: "ssh_key" }, + SCP_PORT: { from_secret: "ssh_port" }, }, }, {