Deploy static site after CI build

I have already seen few templates from Railway & the community for deploying static site to Caddy or Nginx.
But in cases the static files are already been version controlled in Git.

Where as, I have a Vite react application, which I would like to deploy using Caddy.
But not sure, how to do that.

0 Replies

a year ago

you mean to say you already have the built static files in git?


a year ago

n/a


I have the SPA source code in the git, and I built the dist/output using CI/CD


not sure, how to deploy that to Railway using caddy


a year ago

any reason why you don't have railway build the spa app?


As far, I know railway doesn't support deployment of static pages.


Right?


a year ago

unlikely vercel, railway is more or less just a generic deployment platform, it's up to you to come up with a deployment strategy that will run an spa app


hmm… let me try it


a year ago

so with that said, I have a ready made drag and drop solution for you if you are okay with railway building the spa app instead of ci/cd


railway is more or less just a generic deployment platform
in that case, what would be the start comand for running the Vite based SPA app


I found your repo for deploying a CRA on Railway, https://github.com/brody192/create-react-app-starter
I will try using this as an example.


a year ago

not that simple unfortunately


a year ago

yes but that's for create react app, did you want the link for a vite spa?


I got that running, thanks for the help 🙂


a year ago

what was the final solution?


I use this https://github.com/brody192/create-react-app-starter as an example to deploy a Vite react SPA on caddy


👌


a year ago

haha you could have just asked me for the vite version


Please do share that as well, maybe I can find something new! 🙂


a year ago