Skip to content

Commit

Permalink
Merge branch 'develop' into S1TNR-23-backend-autenticacion-y-seguridad
Browse files Browse the repository at this point in the history
  • Loading branch information
isakiDev authored Aug 31, 2024
2 parents eb05734 + c5b15e9 commit 8aaac64
Show file tree
Hide file tree
Showing 8 changed files with 537 additions and 5 deletions.
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## TICKET

- [INSERTAR NOMBRE LA ISSUE AQUI](INSERTAR DEL LINK TICKET AQUI)

## Descripción

Describe brevemente el cambio que has hecho.

## Evidencia:

### Happy Path

(Poner screenshots/video/gifs aquí)

### Unhappy Path

(Poner screenshots/video/gifs aquí)
32 changes: 32 additions & 0 deletions .github/workflows/deploy_backtend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy Backend
on:
pull_request:
types: [closed]
paths:
- "backend/**"
- ".github/workflows/deploy-backend.yml"

jobs:
deploy-backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"

- name: Install Dependencies
run: |
rm package-lock.json
npm install
# Pasos para el deploy en Railway
- name: Install Railway
run: npm i -g @railway/cli

- name: Deploy
run: npm run deploy -w backend
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/deploy_frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Vercel Production Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
paths:
- "frontend/**"
jobs:
Deploy-Production:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "18"

- name: Install Vercel CLI
run: npm install --global vercel@latest

- name: Install dependencies
run: npm install

- name: Deploy to Vercel
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} # Configura la variable de entorno
run: npm run deploy -w frontend
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules

mongo
mongoDataBase
.env
3 changes: 2 additions & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json"
"test:e2e": "jest --config ./test/jest-e2e.json",
"deploy": "railway up --service ohmytrip-backend"
},
"dependencies": {
"@nestjs/common": "^10.0.0",
Expand Down
12 changes: 12 additions & 0 deletions backend/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Oh My Trip</title>
</head>
<body>
<h2>Welcome to the OhMyTrip API!</h2>
<p>Here you will see the documentation soon.</p>
</body>
</html>
3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"deploy": "vercel deploy --prod --token=$VERCEL_TOKEN"
},
"dependencies": {
"next": "14.2.6",
Expand Down
Loading

0 comments on commit 8aaac64

Please sign in to comment.