musclepull
PROOP
8 months ago
As the title says, trying to deploy on PR open. However, greeted with the:
Deploying PR #94 to preview environmentβ¦
π Linking to existing project: ***
Unauthorized. Please login with railway login
When I do try to authenticate, I get the non-interactive constraint
This is my workflow:
- name: Deploy to PR Preview Environment
run: |
echo "π Deploying PR #${{ github.event.number }} to preview environment..."
# Link to your existing project
echo "π Linking to existing project: ${{ secrets.RAILWAY_PROJECT_ID }}"
railway link --project ${{ secrets.RAILWAY_PROJECT_ID }}
# Add database service if this is a new environment
echo "ποΈ Ensuring database service exists..."
railway add postgresql 2>/dev/null || echo "PostgreSQL service may already exist"
# Deploy the application
echo "π Starting deployment..."
railway deploy --detach
echo "β³ Waiting for deployment to complete..."
sleep 60
echo "π Checking deployment status..."
railway status
echo "π Getting application URL..."
DEPLOY_URL=$(railway domain 2>/dev/null || echo "Domain will be auto-assigned")
echo "β
PR deployment complete!"
echo "π Application URL: $DEPLOY_URL"
echo "π Environment: $ENVIRONMENT_NAME"
env:
RAILWAY_API_TOKEN: ${{ secrets.RAILWAY_TOKEN }}5 Replies
noahd
EMPLOYEE
8 months ago
In the `RAILWAY_TOKEN` field are you putting a user token or project token?

