cljsinfo / cljs.info

ClojureScript website
http://cljs.info
MIT License
96 stars 9 forks source link

set up dev-ops / server config #29

Open oakmac opened 9 years ago

oakmac commented 9 years ago

I need to set up some scripts and config with my web host in order to push updates to the site automatically with the running node server.

I have this already working for the cheatsheet, but the doc pages will need something more involved, which should be able to work with the entire site.

comamitc commented 9 years ago

I have built something for my projects that might work... we could adapt it:

https://github.com/comamitc/build-server/blob/master/build.js

comamitc commented 9 years ago

@oakmac can you open source what you already have (or private bitbucket repo) so that I can dig into this one a bit more?

oakmac commented 9 years ago

It's a very simple shell script similar to the one found here: https://github.com/cljsinfo/cljs.info/blob/master/00-scrap/publish-cheatsheet.example.sh

In general, I want to keep this devops / server logic as simple as possible. Keep as much complexity in the CLJS code as possible.

comamitc commented 9 years ago

Nice - that's along the same lines of what I was thinking as well.

My previous build server would simply be listening with a github hook and when pushing to master it would git clone (which you are able to do to any public repo) and execute some kind of generic build script (let's call it ./build.sh). This would accomplish continuous deployment on the master branch.

The build script would probably only consist of one time grunt and lein tasks. In fact, we could embed grunt tasks in the project.clj so it only has to call one command.