add railway deployment #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Railway | |
on: | |
push: | |
branches: [main] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Node setup | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: '9' | |
- name: Install packages | |
run: pnpm install | |
- name: Install Railway | |
run: pnpm i -g @railway/cli | |
- name: Deploy | |
run: railway up --service nestjs-admin | |
env: | |
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }} |