diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..ce5a0f1 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,34 @@ +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 }} \ No newline at end of file diff --git a/nixpacks.toml b/nixpacks.toml new file mode 100644 index 0000000..d0c85d4 --- /dev/null +++ b/nixpacks.toml @@ -0,0 +1,8 @@ +[phases] + setup = "pnpm install --frozen-lockfile" + +[phases.build] + run = "pnpm run build" + +[phases.start] + run = "pnpm run start"