a year ago
Hi there, I began this service a recently and at that time generated a lengthy token for integration into my web application. we are trying to push code to Github, receiving a token error for both RAILWAY_TOKEN and RAILWAY_PROJECT_ID. I've tried to navigate the GUI to obtain a token that will work with Github. No joy after two days. Can you help?
4 Replies
a year ago
Hey there! We've found the following might help you get unblocked faster:
- 📚 Integrations
- 🧵 Unauthorized. Please login with
railway loginwhen running GitHub Action workflow - 🧵 Can't connect to github
- 🧵 Github Integration Failed
If you find the answer from one of these, please let us know by solving the thread!
a year ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 11 months ago
a year ago
Can you please provide some more context about the issue? Why are you in need of those variables, and did it functioned before, or was the error coming since the first deployment?
It seems that you might be needing "REFERENCED VARIABLES", so do have a look at this doc: https://docs.railway.com/guides/variables#reference-variables
a year ago
In your .github/workflows/deploy.yml:
name: Deploy to Railway
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install -g railway
- run: railway up --yes
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
RAILWAY_PROJECT_ID: ${{ secrets.RAILWAY_PROJECT_ID }}
a year ago
I guess, while pasting the code from your machine, it lost it indentation (because yaml files work on indentation). By the way, your actual server file uses which language, because setting up variables beforehand/in the server file does not make any difference. The thing is, the variables might not be available when the yaml file is expecting them to be.
Also, what is this "RAILWAY_TOKEN" variable. There is nothing like this! This could also be the issue. Please provide the build-log error to see more about the issue