Skip to content

Commit

Permalink
Reemplazo de contenido desde móvil
Browse files Browse the repository at this point in the history
  • Loading branch information
Melkoroth committed Feb 22, 2025
0 parents commit 7afde17
Show file tree
Hide file tree
Showing 35 changed files with 1,483 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 5
commit-message:
prefix: "deps"
57 changes: 57 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

name: CI/CD for Medical-RAGArch-System

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
install-dependencies:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test with Pytest
run: |
pytest tests
deploy-to-aws-lambda:
runs-on: ubuntu-latest
needs: install-dependencies
steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install AWS SAM CLI
run: |
pip install aws-sam-cli
- name: Package and Deploy with SAM
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
run: |
sam build
sam package --output-template-file packaged.yaml --s3-bucket ${{ secrets.S3_BUCKET_NAME }}
sam deploy --template-file packaged.yaml --stack-name medical-ragarch-system --capabilities CAPABILITY_IAM
29 changes: 29 additions & 0 deletions .github/workflows/deploy_to_dynamodb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

name: Deploy to AWS DynamoDB using OIDC

on:
push:
branches:
- main

permissions:
id-token: write
contents: read

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Configure AWS Credentials using OIDC
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/GitHubOIDCRole
aws-region: us-east-1

- name: Deploy Data to DynamoDB
run: |
aws dynamodb batch-write-item --request-items file://data/dynamodb_data.json
31 changes: 31 additions & 0 deletions .github/workflows/deploy_to_lambda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

name: Deploy to AWS Lambda using OIDC

on:
push:
branches:
- main

permissions:
id-token: write
contents: read

jobs:
deploy_lambda:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Configure AWS Credentials using OIDC
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/GitHubOIDCRole
aws-region: us-east-1

- name: Deploy to Lambda with Auto Scaling
run: |
zip -r function.zip .
aws lambda update-function-code --function-name MyRAGArchLambda --zip-file fileb://function.zip
aws lambda update-function-configuration --function-name MyRAGArchLambda --memory-size 512 --timeout 30
30 changes: 30 additions & 0 deletions .github/workflows/update_prompts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

name: Actualización de Prompts desde GitHub

on:
schedule:
- cron: '0 0 * * *'
push:
branches:
- main

permissions:
id-token: write
contents: read

jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repositorio
uses: actions/checkout@v3

- name: Configurar Credenciales con OIDC
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/GitHubOIDCRole
aws-region: us-east-1

- name: Sincronizar Prompts desde GitHub
run: |
python scripts/update_prompts.py
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Archivos y carpetas que no deben subirse a GitHub

# Directorios del sistema operativo
.DS_Store
Thumbs.db

# Archivos de configuración del entorno virtual
venv/
.env

# Archivos de logs
*.log

# Archivos de caché y temporales
__pycache__/
*.pyc

# Archivos sensibles
config.json
secrets.env

# Archivos de dependencias
node_modules/
Loading

0 comments on commit 7afde17

Please sign in to comment.