shellphone.app/.github/workflows/main.yml
2021-08-20 14:15:52 +08:00

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 }}"