Force build via Railway CLI
I am using Github Actions to force a build of my Astro frontend if content in the CMS is updated.
Here are my steps:
When I run
railway up -e staging --service astro_frontend
directly from my CLI, it works.
However Railway skips the build if no files have physically changed.
How can I force the build to complete?14 Replies
do you have any watch paths set?
yes
well if nothing changes of course railway isn't gonna rebuild, just write a random file into that folder in your action
How about if I remove the watch path?
that works too, but then a build would be triggered if you made changes to another app within the repo
I was thinking that I could move them all into github actions rather than rely opon Railway to trigger the builds.
e.g - push to repo > github action (create custom watch) >
railway up -e staging --service astro_frontend
I think the ability to override/force build would be a handy addition to the CLI. I'll create a ticket for it
thanks for helping, as always Brodythat would not be a simple addition to the cli
I can always ask!
fair enough
awesome, removing the watch for my frontend worked perfectly. Thanks!
no problem 🙂
I took your advice and removed all the complexity.
Added the watch path back. (Not going to ask for CLI amends 🙂 )
Instead I amend the README with the last deployed date.
okay now that's even better than creating a random file