如何使用Git部署和同步原型Clojurescript应用程序?

时间:2016-08-18 11:20:38

标签: git clojure clojurescript

我一直在使用figwheel编写Clojurescript应用程序。我间歇性地将我的代码推送到Git存储库。 我希望人们能够在他们的浏览器中尝试我推送的最新版本。

之前我曾使用AWS EC2实例托管javascript应用,但每次我想更新时都必须手动cp我的代码。

是否有一种方便的方法来使用Git部署和同步cljs浏览器应用程序?

1 个答案:

答案 0 :(得分:2)

Github Pages非常便于托管页面,因为它可以在您的仓库的gh-pages分支内提供服务。

HTTP(S)://username.github.io/projectname

我喜欢使用deploy.sh脚本:

#!/bin/bash
set -e
cd $(dirname $0)
lein do clean, cljsbuild once min
cd resources/public
git init
git add .
git commit -m "Deploy to GitHub Pages"
git push --force --quiet "git@github.com:timothypratley/pirates.git" master:gh-pages
rm -fr resources/public/.git

您还可以指定目录: https://github.com/blog/2228-simpler-github-pages-publishing

如果您需要更多功能,Firebase和Heroku会很好。