Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/develop-CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
- name: Install and format (No build in develop)
run: |
npm ci
npm run format

# 👉 Build la imagen Docker
- name: Build Docker image
Expand Down Expand Up @@ -55,5 +54,5 @@ jobs:
script: |
cd /home/proyectosdanils/
docker compose down
docker pull ${{ secrets.DOCKER_USERNAME }}/frontend-dev:develop
docker compose up -d
docker pull ${{ secrets.DOCKER_USERNAME }}/frontend-dev:stage
docker compose up -d
9 changes: 4 additions & 5 deletions .github/workflows/master-CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
deploy:
if: github.event.pull_request.merged == true # Solo si se hizo merge
if: github.event.pull_request.merged == true # Solo si se hizo merge
name: 🚀 PRODUCTION Deploy Next.js to GCP
runs-on: ubuntu-latest

Expand Down Expand Up @@ -38,7 +38,6 @@ jobs:
mkdir -p ~/.ssh
ssh-keyscan ${{ secrets.GCP_VM_IP }} >> ~/.ssh/known_hosts


# 4. Detener PM2 antes de la subida
- name: Stop PM2 before upload
uses: appleboy/ssh-action@v0.1.4
Expand All @@ -58,13 +57,13 @@ jobs:
host: ${{ secrets.GCP_VM_IP }}
username: ${{ secrets.GCP_VM_USER }}
key: ${{ secrets.GCP_SSH_KEY }}
source: "prod-dist"
target: "/home/proyectosdanils/frontend-prod"
source: 'prod-dist'
target: '/home/proyectosdanils/frontend-prod'
port: 22
timeout: 30s
rm: true

# 6. Reiniciar PM2 en la VM
# 6. Reiniciar PM2 en la VM
- name: Restart PM2
uses: appleboy/ssh-action@master
with:
Expand Down
1 change: 0 additions & 1 deletion app/(protected)/dashboard/room/_components/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,3 @@ export default function Message({ message }: Props) {
</div>
);
}

3 changes: 1 addition & 2 deletions app/(protected)/dashboard/room/_components/MessageInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default function MessageInput({ onSend, bottomRef }: Props) {
onChange={e => setMessage(e.target.value)}
onKeyDown={onKeyDown}
rows={1}
placeholder='Escribe un mensaje'
placeholder="Escribe un mensaje"
/>
</div>
<button type="submit" className="p-4 cursor-pointer">
Expand All @@ -68,4 +68,3 @@ export default function MessageInput({ onSend, bottomRef }: Props) {
</form>
);
}

Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ export default function MessagesList({ room_id, initial_messages }: Props) {
</>
);
}

5 changes: 2 additions & 3 deletions app/_hooks/useScroll.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useEffect, useRef, useState } from 'react';
interface Props<T> {
items: T[]
items: T[];
}
export default function useIsBottom<T>({items}: Props<T>) {
export default function useIsBottom<T>({ items }: Props<T>) {
const containerRef = useRef<HTMLDivElement | null>(null);
const bottomRef = useRef<HTMLDivElement | null>(null);
const [isInBottom, setIsInBottom] = useState(true);
Expand Down Expand Up @@ -30,4 +30,3 @@ export default function useIsBottom<T>({items}: Props<T>) {

return { containerRef, bottomRef };
}

2 changes: 1 addition & 1 deletion app/_ui/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ body {

.font-quicksand {
font-family: 'Quicksand', sans-serif;
}
}
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ services:
context: .
dockerfile: Dockerfile.dev
ports:
- "3000:3000"
- '3000:3000'
volumes:
- .:/home/frontend-dev
- /home/frontend-dev/node_modules
environment:
- NODE_ENV=development
- NODE_ENV=development
1 change: 0 additions & 1 deletion next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const nextConfig: NextConfig = {
},
],
},
// @ts-ignore: webpackDevMiddleware no está tipada pero es válida
webpackDevMiddleware: (config: any) => {
config.watchOptions = {
poll: 1000,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"devt": "next dev --turbopack",
"dev": "next dev",
"build": "next build",
"build": "next build --no-lint",
"start": "next start",
"lint": "next lint",
"format": "prettier --write ."
Expand Down