19 lines
573 B
YAML
19 lines
573 B
YAML
name: Deployment pipeline
|
|
|
|
on: push
|
|
|
|
jobs:
|
|
deploy:
|
|
if: contains('refs/heads/master refs/heads/production', github.ref)
|
|
name: Deploy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 16
|
|
- run: npm i -g @railway/cli
|
|
- run: railway up
|
|
env:
|
|
RAILWAY_TOKEN: "${{ github.ref }} === 'refs/heads/master' ? ${{ secrets.RAILWAY_TOKEN_DEV }} : ${{ secrets.RAILWAY_TOKEN_PROD }}"
|