What is a typical build process for your websites?

Like the title says, how does your build process look? Do you guys build your app locally and push it? I have seen many posts about heroku (which doesn’t seem like the right tool). Is there a common way you guys maintain/update your websites?

I am not sure if this is the right place to ask this. Please let me know otherwise.

Hi @minhajuddin. My build process is 1. Update files 2. push to git 3. deploy to server

1 Like

Thanks for the response @dikaio
Do you build stuff locally? Where do you host your site?

Hi @minhajuddin. I host my sites with different hosts. If fire up a new server it’s usually with digitalcoean or joyent but I have a bunch of sites with cache fly, their CDN is crazy fast but if you use them you need to know how to upload with rsync. I would suggest looking into middleman deploy for uploading to the server. Here’s a example configuration using the deploy gem:

activate :deploy do |deploy|
  deploy.method            = :rsync
  deploy.host              = "example.com"
  deploy.path              = "/srv/www/example.com/public"
  deploy.user              = "username"
  deploy.clean             = "true"
end

If you don’t want to keep some of that info in your config file just create a .env file in the root with all your environment variables and then import it in you config by add this line to the top:

ENV = YAML::load(File.open('.env.yml')) 

and you would define environment variables like:

HOST: "example.com"
1 Like

Sorry missed the first part of your question. Yes I build locally, backup to git and push to CDN or server.

1 Like
  1. make local changes and check them with middleman server
  2. when there are enough changes, publish the website with rsync

Sources and data are versioned with git, but I am lazy with respect to keeping commits and deployments in sync, which would be a nice practice, btw.

For this reason, I wrote a Rakefile which checks whether I need to build or deploy a website. After reading your post, I just made it available on Github (https://github.com/avillafiorita/middleman-rakefile), just in case you or someone else might find it useful.

1 Like