Skip to content

Commit 9ffabc0

Browse files
authored
Merge pull request #4 from my-python-projects/develop
Update Project
2 parents c066e18 + d3cc227 commit 9ffabc0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+9981
-87
lines changed

.github/workflows/deploy.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
9+
branches:
10+
- main
11+
- develop
12+
13+
jobs:
14+
build-backend:
15+
name: Build and Test Backend
16+
runs-on: ubuntu-latest
17+
18+
services:
19+
mongo:
20+
image: mongo:latest
21+
ports:
22+
- 27017:27017
23+
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v2
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v2
30+
with:
31+
python-version: '3.9'
32+
33+
- name: Install dependencies
34+
working-directory: ./backend
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install -r requirements.txt
38+
39+
build-frontend:
40+
name: Build Frontend
41+
runs-on: ubuntu-latest
42+
43+
steps:
44+
- name: Checkout repository
45+
uses: actions/checkout@v2
46+
47+
- name: Setup Node.js
48+
uses: actions/setup-node@v2
49+
with:
50+
node-version: '20'
51+
52+
- name: Install dependencies
53+
working-directory: ./frontend
54+
run: npm install
55+
56+
- name: Build project
57+
working-directory: ./frontend
58+
run: npm run build
59+
60+
deploy-frontend:
61+
name: Deploy Frontend to GitHub Pages
62+
runs-on: ubuntu-latest
63+
needs: build-frontend
64+
if: github.ref == 'refs/heads/main'
65+
66+
steps:
67+
- name: Checkout repository
68+
uses: actions/checkout@v2
69+
70+
- name: Deploy to GitHub Pages
71+
uses: JamesIves/github-pages-deploy-action@v4.1.5
72+
with:
73+
branch: develop
74+
folder: frontend/dist

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
/relatorios
2-
app/__pycache__
32
app/logs
4-
*.docx
3+
*.docx
4+
/backend/venv/*
5+
**/node_modules/
6+
**/__pycache__/
7+
/frontend/package-lock.json
8+
/backend/.env
9+
/backend/logs/*

0 commit comments

Comments
 (0)