3 months ago
Hi, I’ve got an expo app where I am utilizing EAS to create preview builds for PRs. I’m also utilizing the PR environment feature for railway.
I’m wondering what the best workflow would be to allow my expo app to correctly point at the corresponding PR service for my rest api. Is there a webhook that fires when a PR environment is created that would contain the domains for the PR env?
I effectively need to fire off a GitHub action build (or maybe a single run railway service?) to run my EAS build with the rest api endpoint updated.
Project id: 3978a91c-e664-4d6c-a288-09fa3a327474
4 Replies
3 months ago
You can set up CI/CD pipelines using Railway's public API to create environments and generate domains for the services.
are you proposing creating PR environments through github actions via the public api instead? Or are you saying something else?
3 months ago
If you want separate domains for each PR, then yes, I'd suggest creating different environments through Github Actions by using the public API.
it ended up being a bit of a pain to go this route, as duplicating the env didn't get me everything, so I was needing to add volumes and other things that the PR environment check box does for me.
I ended up trying a different route, polling from a github action after the deploy and grabbing the domain from there, and then kicking off my build