https://github.com/akiroz/lein-skygear
A leiningen plugin that automates cloud code deployment to skygear cloud
https://github.com/akiroz/lein-skygear
leiningen skygear
Last synced: 3 months ago
JSON representation
A leiningen plugin that automates cloud code deployment to skygear cloud
- Host: GitHub
- URL: https://github.com/akiroz/lein-skygear
- Owner: akiroz
- License: mit
- Created: 2016-09-28T08:26:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-27T09:49:25.000Z (over 8 years ago)
- Last Synced: 2025-09-27T22:33:59.667Z (3 months ago)
- Topics: leiningen, skygear
- Language: Clojure
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lein-skygear
[](https://clojars.org/lein-skygear)
[](https://raw.githubusercontent.com/akiroz/lein-skygear/master/LICENSE)
[](https://travis-ci.org/akiroz/lein-skygear)
A leiningen plugin that automates cloud code deployment to skygear cloud
Note: this plugin relies on `ssh` and `git` (>= 2.3.0) on `$PATH`.
The git version is for ssh identity overriding, you may use an older version if this is not required.
## Usage
Add the following to `project.clj`:
```clojure
:skygear {:dev {:git-url "ssh://git@git.skygeario.com/.git"
;; optional, overrides default ssh identity
:ssh-key "path/to/private_key"
;; provide either or both of the following
:source-dir "path/to/cloud_code/src"
:static-dir "path/to/static/assets"}
:release {...}}
```
A `__init__.py` file is expected in the `:source-dir` directory, otherwise deployment will fail.
Files inside `:static-dir` is copied to a folder named `public_html` in the cloud code repo
and accessible from the internet with `.skygeario.com/static/`. If `:source-dir`
is not specified, an empty `__init__.py` file will be created for you.
### Deploy:
```
$ lein deploy-skygear # default dev, OR:
$ lein deploy-skygear release
```
### Travis CI:
Since it is not trivial to get `git >= 2.3.0` on the test containers, here's a workaround:
```yaml
before_deploy:
- cp path/to/private_key ~/.ssh/my_key
- chmod 600 ~/.ssh/my_key
- echo "Host *" >> ~/.ssh/config
- echo " StrictHostKeyChecking no" >> ~/.ssh/config
- echo " IdentityFile ~/.ssh/my_key" >> ~/.ssh/config
```