Open mstijak opened 8 years ago
This may help: https://surge.sh/help/redirecting-www-to-root-automatically
For the use case I have, this is preferred. As we are using surge to publish the releases of our projects. Currently, there will be:
BRANCH.PROJECT.ORGANISATION.surge.sh
TAG.PROJECT.ORGANISATION.surge.sh
COMMIT.PROJECT.ORGANISATION.surge.sh
While this is fine, it is a bit extreme. It would be nice if we could just deploy to:
PROJECT.ORGANISATION.surge.sh/BRANCH/
PROJECT.ORGANISATION.surge.sh/TAG/
PROJECT.ORGANISATION.surge.sh/COMMIT/
If there is no index.html
at PROJECT.ORGANISATION.surge.sh
it can just be a directory listing.
I have the same problem wanting to publish to domain.com/example1 and domain.com/example2, still haven't found anything working
I am working around this by using recursive wget from the single deploy site PROJECT.surge.sh to get everything, by then adding/replacing subdirectories, and finally backdeploying everything to the site. This adds some, meaning a lot of, traffic so may be not feasible for large projects/frequent deploys but bandwidth is often cheap or included with services like travis. Just instantiating a site per commit/PR seems popular, however.
Is it possible to publish a project into a subdirectory?
I tried using
name.surge.sh/directory
as domain name but that doesn't seem to be working.Different parts of my site are developed in different repositories and it would be great to publish each part independently.