{"id":41669971,"url":"https://github.com/cake-lier/sbt-remote-deploy","last_synced_at":"2026-01-24T17:37:11.344Z","repository":{"id":37186024,"uuid":"488590440","full_name":"cake-lier/sbt-remote-deploy","owner":"cake-lier","description":"A sbt plugin for deploying a scala artifact remotely","archived":false,"fork":false,"pushed_at":"2026-01-15T05:46:56.000Z","size":2170,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-15T11:59:30.132Z","etag":null,"topics":["automation","ci-cd","deployment","sbt","sbt-plugin","ssh"],"latest_commit_sha":null,"homepage":"https://cake-lier.github.io/sbt-remote-deploy/io/github/cakelier/","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cake-lier.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-04T13:01:45.000Z","updated_at":"2026-01-15T05:46:36.000Z","dependencies_parsed_at":"2023-09-22T02:51:36.133Z","dependency_job_id":"aeb704b1-397b-4556-8683-c908b224b21c","html_url":"https://github.com/cake-lier/sbt-remote-deploy","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/cake-lier/sbt-remote-deploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cake-lier%2Fsbt-remote-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cake-lier%2Fsbt-remote-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cake-lier%2Fsbt-remote-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cake-lier%2Fsbt-remote-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cake-lier","download_url":"https://codeload.github.com/cake-lier/sbt-remote-deploy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cake-lier%2Fsbt-remote-deploy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28732762,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","ci-cd","deployment","sbt","sbt-plugin","ssh"],"created_at":"2026-01-24T17:37:11.271Z","updated_at":"2026-01-24T17:37:11.333Z","avatar_url":"https://github.com/cake-lier.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sbt-remote-deploy\n\n[![Build status](https://github.com/cake-lier/sbt-remote-deploy/actions/workflows/publish.yml/badge.svg)](https://github.com/cake-lier/sbt-remote-deploy/actions/workflows/publish.yml)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.cake-lier/sbt-remote-deploy/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.cake-lier/sbt-remote-deploy/)\n[![semantic-release: conventional-commits](https://img.shields.io/badge/semantic--release-conventional_commits-e10098?logo=semantic-release)](https://github.com/semantic-release/semantic-release)\n[![License: MIT](https://img.shields.io/github/license/cake-lier/sbt-remote-deploy)](https://github.com/cake-lier/sbt-remote-deploy/blob/main/LICENSE)\n[![Scaladoc](https://img.shields.io/badge/scaladoc-latest-brightgreen)](https://cake-lier.github.io/sbt-remote-deploy/io/github/cakelier/)\n\nA sbt plugin for deploying one or more scala artifacts remotely.\n\n## How to install\n\nSimply add the following line to your ``project/plugins.sbt``\n\n```scala\naddSbtPlugin(\"io.github.cake-lier\" % \"sbt-remote-deploy\" % \"2.0.0\")\n```\n\nand then enable the plugin in your ``build.sbt`` file like so\n\n```scala\nlazy val root = project\n  .in(file(\".\"))\n  .enablePlugins(RemoteDeployPlugin)\n```\n\n## How to use\n\n### Documentation\n\nFor first, you need to configure the remote location or the remote locations you want to access with this plugin. You must \nspecify the host to reach and the user to use, as you would do if you were starting an SSH connection. You can also specify \nthe port of the machine to which connect, but if not specified, the default is the port 22. You can also specify the method to \nbe used for connecting to the remote location. If a password-based authentication is used, you can supply a password or, if a \nprivate key-based authentication is used, you can specify the path to the local file containing the key and the possible \npassphrase used for encrypting the key. Other configuration parameters include the fingerprint for the remote location \nidentity, which can be supplied for checking if the two match, and a parameter to be thorough with the identity verification \nprocess, which is by default `true`. No worries if you already connected with the remote, and you saved its identity to the \n`known_hosts` file, the default files containing already known hosts are loaded by default, if found on your local machine. \nFor knowing how to specify those parameters within a configuration file, jump to section \n\"[Configuration file](#configuration-file)\". If you want to specify your configuration via code, for example in your \n`build.sbt` file, jump to section \"[DSL](#dsl)\".\n\nAfter creating your configurations, you just need to put them where the plugin can find them. The setting key \n`remoteDeployConfFiles` can be used for specifying the path **relative** to the current project folder of all your configuration \nfiles. This folder is then considered the base folder for each configuration file path. If you specified your configurations \nthrough code, you can use it into the setting key `remoteDeployConfs`, which accepts a pair made of the name of the \nconfiguration and the configuration itself. When you have done this, your configurations are ready to be used!\n\nThe last step is to specify the artifacts to deploy and the operations to be performed before and after the deployment happens.\nThrough the setting key `remoteDeployBeforeHook` you can specify a function which receives an object as input that allows you \nto run commands on the remote location, as they were launched in a terminal, before the deployment of the artifact is done. \nYou can specify all preparation operations such as cleaning, directory creation, etc. The setting key `remoteDeployAfterHook` \nis similar, the only difference is that the function will be called only after the copy of all the artifacts has completed \nwith success, otherwise this callback won't be called. All commands specified in those functions are executed asynchronously, \nbecause they can take a long time for completing, but no worries! All the output will be copied onto your standard output and \nstandard error, so you can see what is happening on your remote machine... Unless you don't want to, but the plugin has you \ncovered also in this case.\n\nLast, but not least, the `remoteDeployArtifacts` setting key, which is to be used for specifying the artifacts to deploy \nremotely. This key accepts pairs of two things: the local `sbt.File` to be deployed to the remote location and the \n**absolute** remote path to which deploy the file, which must contain also the name of the file itself, not necessarily the \nsame of the one in the local machine. Being the local file an `sbt.File`, this plugin is thought for working hand in hand \nwith the \"sbt-assembly\" plugin and the default `compile` task.\n\nWhen everything is configured correctly, you can launch your remote deploy task. Just write on your terminal\n\n`sbt remoteDeploy \u003cconfiguration name\u003e` \n\nand the plugin will load all your configurations, search for the one with the name you inserted \nand use it in its deployment pipeline.\n\n### Setting keys\n\n| Setting name             | Description                                                                                                    | Default value |\n|--------------------------|----------------------------------------------------------------------------------------------------------------|---------------|\n| `remoteDeployConfFiles`  | a `Seq` of strings, each of which is the path to a file containing the remotes configurations.                 | `Seq.empty`   |\n| `remoteDeployConfs`      | a `Seq` of pairs made from the name of the configuration and the object representing the configuration itself. | `Seq.empty`   |\n| `remoteDeployArtifacts`  | a `Seq` of pairs made from the local file to be copied and the remote path to which it should be copied.       | `Seq.empty`   |\n| `remoteDeployBeforeHook` | an `Option` containing a function which can be used to perform commands on the remote before the copy happens. | `None`        |\n| `remoteDeployAfterHook`  | an `Option` containing a function which can be used to perform commands on the remote after the copy happened. | `None`        |\n\n### Configuration file\n\nA sample file configuration is the one that follows.\n\n```HOCON\nremotes {\n  test {\n    host = localhost\n    user = me\n    password = example\n    verifyIdentity = false\n  },\n  production {\n    host = example.org\n    user = root\n    port = 2022\n    privateKeyFile = /home/me/.ssh/non_standard_key_name\n    privateKeyPassphrase = example\n    fingerprint = d3:5e:40:72:db:08:f1:6d:0c:d7:6d:35:0d:ba:7c:32\n  }\n}\n```\n\nThe file format is the \"[HOCON](https://github.com/lightbend/config)\" one, developed by Lightbend as a JSON superset. A root \nobject must be specified with the key \"remotes\", which should contain an object for each configuration. The keys that can be \nspecified are the ones present in the example, so `host`, `port`, `user`, `password`, `privateKeyFile`, `privateKeyPassphrase`,\n`fingerprint`, `verifyIdentity`. To know what they mean and if they are mandatory or not, please refer to the \n\"[Documentation](#documentation)\" section. Every field needs a string value except for the `port` one, which accepts only \nintegers, and the `verifyFingerprint`, which accepts only boolean values. The configuration file format tries to be as close as \npossible to the [DSL specification](#dsl).\n\n### DSL\n\nThe configurations, along with their names, can be specified in the `build.sbt` file using the DSL as follows.\n\n```scala\nremoteDeployConf := Seq(\n  remoteConfiguration(withName = \"test\") {\n    has host \"localhost\"\n    has user \"me\"\n    has password \"example\"\n    has verifyIdentity false\n  },\n  remoteConfiguration(withName = \"production\") {\n    has host \"example.org\"\n    has user \"root\"\n    has port 2022\n    has privateKeyFile \"/home/me/.ssh/non_standard_key_name\"\n    has privateKeyPassphrase \"example\"\n    has fingerprint \"d3:5e:40:72:db:08:f1:6d:0c:d7:6d:35:0d:ba:7c:32\"\n  }\n)\n```\n\nThe fields that can be specified for tuning the parameters of a remote configuration are the ones present in the example, so \n`host`, `port`, `user`, `password`, `privateKeyFile`, `privateKeyPassphrase`, `fingerprint`, `verifyIdentity`. To know what \nthey mean and if they are mandatory or not, please refer to the \"[Documentation](#documentation)\" section. Every field needs a \nstring value except for the `port` one, which accepts only integers, and the `verifyFingerprint`, which accepts only boolean \nvalues. The DSL tries to be as close as possible to the [configuration file format](#configuration-file).\n\n### Hooks\n\nAn example of a possible hook is the one that follows.\n\n```scala\nremoteDeployBeforeHook := Some(remote =\u003e\n  (for {\n    result \u003c- remote.run(\"mkdir test\")\n  } yield result.exitCode)\n    .onComplete {\n      case Success(Some(c)) =\u003e println(c)\n      case _ =\u003e println(\"Error\")\n    }\n)\n```\n\nThe function receives as a parameter a \"remote\" objects which provides the methods to be called for executing commands on the \nremote machine. Its results can then be inspected when the command completed its execution. While executing, all output from \neach command will be printed to the command line.\n\n## ⚠️⚠️⚠️ Warnings ⚠️⚠️⚠️\n\nEvery configuration, being in a configuration file or directly specified in the ``build.sbt`` file, must have a unique name. \nIf the name is not unique, clashes may happen between configurations and only the last one specified is kept. \nIn this operation, configurations specified in the ``build.sbt`` file have more precedence than the ones in the configuration files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcake-lier%2Fsbt-remote-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcake-lier%2Fsbt-remote-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcake-lier%2Fsbt-remote-deploy/lists"}