a year ago
When I try to automate the deployment process through github actions, I get the same error.
Here's the yml file:
name: Deploy to Railway
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Railway Deploy
uses: bervProject/railway-deploy@main
with:
railway_token: ${{ secrets.RAILWAY_TOKEN }}
service: "my-service"
detach: true
0 Replies
a year ago
may I ask why you are installing python and your apps deps in the action?
a year ago
what is the purpose of using a GitHub action in the first place?
a year ago
did you just give me a chatgpt answer to my question?
a year ago
okay then please answer the question properly
Say we have a project in GitHub, say at each push, we want to lint, test, build, and finally deploy if everything goes right in one single push.
a year ago
I know what you can do with GitHub actions, I'm asking what purpose it has for you, why not just set your repo to your source in the service settings?
Does the update happens automatically in Railway after I change something in main branch of github?
a year ago
yes that's exactly how railway works
a year ago
there's no need for a GitHub action to achieve that functionality
If we were to do it in other platforms like AWS, AZURE… do we need to set up YML file?
a year ago
what does aws or azure have to do with railway?
I mean I was learning how to deploy Flask app on AWS EC2 instance the other day. I was trying to automate through github actions similarly. I got bunch of errors, so I quit.
a year ago
use your repo as a source and let me know if you run into further issues
let me clear one more thing for now, do I not need.github/workflow/deploy.yml file in my repo?
Also, if I deploy my project in RAILWAY through GitHub repo (source), from where does the ci/cd automation carry out?
a year ago
you do not need a workflow action for a simple railway deploy, but having it is not going to affect anything.
there will be no ci/cd ran, only your app will be ran
It means I have to push the correct code in github repo everytime otherwise the deployment may get an error? right?
a year ago
as long as you implement a readiness health check, railway won't push a build out if it fails building or the health check
a year ago
no problem!
just had an idea, can you clarify?
i.e. to add yml file to lint and test for each push in github. Only after successful test, it is push to github main, after which gets automatically deployed in RAILWAY.
a year ago
please don't ping, it's against the server rules
a year ago
but I'm sorry, I'm not going to help with AI generated answers, please watch some YouTube videos and read some articles written by humans who know what they're talking about