Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit 609d36a

Browse files
committed
feat: deploy
1 parent e29c8a1 commit 609d36a

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy to Caprover
2+
permissions: read-all
3+
on:
4+
push:
5+
branches: main
6+
7+
jobs:
8+
build-and-deploy:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
node-version: [18.x]
14+
15+
steps:
16+
- name: Deploy to CapRrover
17+
uses: caprover/[email protected]
18+
with:
19+
server: '${{ secrets.CAPROVER_SERVER }}'
20+
app: trending
21+
token: '${{ secrets.CAPROVER_TOKEN }}'
22+
23+
migrations:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: actions/setup-node@v4
28+
with:
29+
node-version: 22.4
30+
- name: install dependencies
31+
run: npm ci
32+
- name: run migrations
33+
run: npm run db:migrate:prod
34+
env:
35+
DATABASE_URL: ${{ secrets.DATABASE_URL }}

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "github-trending",
33
"version": "0.0.1",
4-
"description": "",
5-
"author": "",
4+
"description": "Has your repo been trending on GitHub and you missed it?",
5+
"author": "Eddie Jaoude",
66
"private": true,
7-
"license": "UNLICENSED",
7+
"license": "MIT",
88
"scripts": {
99
"build": "nest build",
1010
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
@@ -17,7 +17,9 @@
1717
"test:watch": "jest --watch",
1818
"test:cov": "jest --coverage",
1919
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
20-
"test:e2e": "jest --config ./test/jest-e2e.json"
20+
"test:e2e": "jest --config ./test/jest-e2e.json",
21+
"db:migrate:dev": "prisma migrate dev",
22+
"db:migrate:prod": "prisma migrate deploy"
2123
},
2224
"dependencies": {
2325
"@nestjs/common": "^10.0.0",

0 commit comments

Comments
 (0)