diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b91de6f..abc892a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,6 +3,7 @@ on: push: branches: - main + - appwrite jobs: build: @@ -31,10 +32,13 @@ jobs: run: | pnpm --filter @pipelineui/app build - - name: Deploy to Railway + - name: Deploy to Railway (${{env.RAILWAY_ENV}}) run: | cd packages/app cp nixpacks.toml .output cp .output/server/package.json .output cd .output + pmpm railway environment ${{env.RAILWAY_ENV}} RAILWAY_TOKEN=${{ secrets.RAILWAY_TOKEN }} pnpm railway up -s pipelineui-server + env: + RAILWAY_ENV: ${{(github.ref == 'refs/heads/main' && 'production') || (github.ref == 'refs/heads/appwrite' && 'appwrite' || null)}}