Deployment challenge

Hello there,
I’ve built a site that is meant to be in two languages but the destination should be also in two separate domains, with /build/lang1 … and /build/lang2 being respectively the two root for the domains.

The problem I couldn’t see so far while developing is that during the build the “domain” setup in the build block and pretending to read from the I18n component is ignored.

Has anybody found a similar challenge?

configure :build do
  set :protocol, "https://"
  set :host, ("www.domain." << (I18n.locale.to_s == "en" ? "co.uk" : "it"))

I’ve also another challenge with the after_build method that doesn’t seem to run anymore.

Ok, guess this is because the configuration block is read once and the file are built all the time.

It would be good to know whether there is a custom block somewhere that is read at all time?

You could try ready

ready do
  ...
end

Where about Tom?

I don’t think this can go in the config.rb file.

config.rb is the place

If you observe the build process, you can see that all locales are built simultaneously, so – I think – there is no specific locale chosen when the deployment gem is doing its thing.

     ...
     updated  build/de/kontakt.html
     updated  build/en/contact.html
     updated  build/kontakt.html
     ...