R
Railway5mo ago
IgnisDa

Specify service to deploy using `railway up`

deploy-production-instance:
runs-on: ubuntu-latest
needs: docker-release
steps:
- name: Set up CLI
run: npm i -g @railway/cli

- name: Deploy
run: railway up --detach
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
deploy-production-instance:
runs-on: ubuntu-latest
needs: docker-release
steps:
- name: Set up CLI
run: npm i -g @railway/cli

- name: Deploy
run: railway up --detach
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
24 Replies
Percy
Percy5mo ago
Project ID: N/A
IgnisDa
IgnisDaOP5mo ago
How do I specify the service to be deployed?
Brody
Brody5mo ago
have you tried running railway up --help ?
IgnisDa
IgnisDaOP5mo ago
yeah. does the default command deploy all the services? since I have a docker image
Brody
Brody5mo ago
no, please see what the help flag prints
IgnisDa
IgnisDaOP5mo ago
it says deploys project from CWD.
No description
IgnisDa
IgnisDaOP5mo ago
i dont have a project in CWD
Brody
Brody5mo ago
you do when deploying from a github action
IgnisDa
IgnisDaOP5mo ago
nope, if you take a look at my action, there is no checkout step. does not make sense to checkout the repo since i dont have any configuration in it at all. I want the deploy to happen on railway.
Brody
Brody5mo ago
ah just thought it wasnt complete
IgnisDa
IgnisDaOP5mo ago
i have a docker image and pg deployed on railway so i should be able to trigger deployments from CI, right?
Brody
Brody5mo ago
i feel like im missing some context here, what do you hope to achieve running railway up without a project
IgnisDa
IgnisDaOP5mo ago
the docker image is set up to use :latest on Railway. So once the docker image is published (docker-release job in my workflow file), I want to deploy the latest tag on railway too.
Brody
Brody5mo ago
okay cool, where does railway up come into play here?
IgnisDa
IgnisDaOP5mo ago
Should i be using railway redeploy?
Brody
Brody5mo ago
i think you have a misunderstanding of what railway up does?
IgnisDa
IgnisDaOP5mo ago
possibly. i used the blog on gh actions.
Brody
Brody5mo ago
that was for deploying a github repo yes
IgnisDa
IgnisDaOP5mo ago
makes sense. If i do not specify --service to redeploy, would it re-deploy the pg instance as well?
Brody
Brody5mo ago
not sure, think it would choose the most recently modified service, or it would tell you that you have not selected a service
IgnisDa
IgnisDaOP5mo ago
why does it want me to be authenticated if i already provided a token?
No description
Brody
Brody5mo ago
what kind of token is that
IgnisDa
IgnisDaOP5mo ago
got it from here
No description
Brody
Brody5mo ago
try an account api token?
Want results from more Discord servers?
Add your server