Skip to content

Commit

Permalink
Atualização do site com novas funcionalidades
Browse files Browse the repository at this point in the history
  • Loading branch information
guipratiko committed Feb 4, 2025
1 parent 153a405 commit 27555a8
Show file tree
Hide file tree
Showing 44 changed files with 6,054 additions and 195 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Deploy to DigitalOcean

on:
push:
branches: [ main ]
Expand All @@ -7,17 +8,14 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Deploy to Digital Ocean
uses: appleboy/ssh-action@master
with:
host: 167.172.139.129
username: root
host: ${{ secrets.DROPLET_IP }}
username: ${{ secrets.DROPLET_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
script: |
cd /var/www/luizautomoveis
git fetch origin main
git reset --hard origin/main
npm install --production
pm2 restart luizautomoveis || pm2 start server.js --name luizautomoveis
cd /var/www/LuizAuto
git pull origin main
npm install
pm2 restart server.js
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
public/images/vehicles/*
!public/images/vehicles/.gitkeep
34 changes: 34 additions & 0 deletions models/Contato.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
const mongoose = require('mongoose');

const contatoSchema = new mongoose.Schema({
nome: {
type: String,
required: true
},
email: {
type: String,
required: true
},
telefone: {
type: String,
required: true
},
assunto: {
type: String
},
mensagem: {
type: String,
required: true
},
dataEnvio: {
type: Date,
default: Date.now
},
status: {
type: String,
enum: ['Não lido', 'Lido', 'Respondido'],
default: 'Não lido'
}
});

module.exports = mongoose.model('Contato', contatoSchema);
Loading

0 comments on commit 27555a8

Please sign in to comment.