A simple GitHub Action to deploy your project to Railway. Instead of using the traditional railway up command in
an Action (which pushes up a tarball), this will instruct Railway to pull a specific commit from GitHub.
steps:
- name: Deploy to Railway
id: deploy
uses: xivauth/railway-deploy-tool@main
with:
railway_token: ${{ secrets.RAILWAY_TOKEN }} # must be project-scoped token
service_id: ${{ vars.RAILWAY_SERVICE_ID }}
commit_sha: ${{ github.sha }} # Optional, defaults to the current commit
wait_for_deploy: true # Optional, defaults to true
- name: Show Deploy Result
run: |
echo "Deployment ID: ${{ steps.railway.outputs.deployment_id }}"
echo "Status: ${{ steps.railway.outputs.deployment_status }}"
echo "Succeeded: ${{ steps.railway.outputs.deployment_succeeded }}"