Staging URLs

When working on websites, I’ve found it to be good practice to create a staging environment on a different branch.

The problem is that, as far as I can tell, the .host_url attribute only allows one URL, so if my site is something.something, I cannot also deploy a dev.something.something staging site from the same codebase, without some runtime modifications to zine.ziggy. Is this a correct assessment?

Yes there’s no builtin functionality.

Currently you would need to switch zine.ziggy through external means.

I have a mostly-implemented, but currently disabled, CLI flag to specify manually which Zine config file to use.

Do you think that would be enough to solve this usecase or am I missing some detail?

1 Like

Nope, that sounds great to me :slight_smile:

Here’s my current solution if anyone stumbles into this in the meantime:
Currently I’m just duplicating the zine.ziggy to staging.zine.ziggy, substituting the url, then adding the following step to my (staging) deployment CI.

      - name: Configure Staging Environment
        run: |
          rm zine.ziggy
          mv staging.zine.ziggy zine.ziggy