Merge pull request 'Add deployment step for development environment and clean up invoice report API code' (#97) from feature/workflows into development

Reviewed-on: ADUANASOFT/anexo76#97
This commit is contained in:
2026-02-05 06:05:20 +00:00
2 changed files with 18 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ on:
push:
branches:
- main
- development
jobs:
build:
@@ -53,3 +54,20 @@ jobs:
- name: Push frontend
run: |
docker push dev.aduanasoft.com/anexo76/frontend:latest
# ------------------------
# Deploy a Development
# ------------------------
- name: Deploy a servidor de desarrollo
if: github.ref == 'refs/heads/development'
run: |
eval $(ssh-agent -s)
ssh-add <(echo "${{ secrets.DEV_SERVER_SSH_KEY }}")
ssh -o StrictHostKeyChecking=yes \
${{ secrets.DEV_SERVER_USER }}@${{ secrets.DEV_SERVER_HOST }} \
"cd /opt/anexo76 && \
echo '${{ secrets.HARBOR_PASSWORD }}' | docker login dev.aduanasoft.com -u '${{ secrets.HARBOR_USERNAME }}' --password-stdin && \
docker compose pull && \
docker compose up -d && \
docker image prune -f"
ssh-agent -k

View File

@@ -1,5 +1,4 @@
const BASE_URL = import.meta.env.VITE_API_URL || '';
const BASE_URL = import.meta.env.VITE_API_URL || '';
export const invoicesReportsApi = {
@@ -15,7 +14,6 @@ export const invoicesReportsApi = {
const token = localStorage.getItem('access_token');
const response = await fetch(endpoint, {
method: 'POST',
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
@@ -31,8 +29,6 @@ export const invoicesReportsApi = {
getTaskStatus: async (taskId: string) => {
const endpoint = `${BASE_URL}/v1/a76/reports/importacion/facturas/tasks/${taskId}`;
const endpoint = `${BASE_URL}/v1/a76/reports/importacion/facturas/tasks/${taskId}`;
const token = localStorage.getItem('access_token');
const response = await fetch(endpoint, {
method: 'GET',