diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index efe3958..b840875 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,15 +1,12 @@ -name: CI - Build and Lint +name: CI on: - push: - branches: [main, develop] pull_request: branches: [main] jobs: build: runs-on: self-hosted - steps: - name: Checkout uses: actions/checkout@v4 @@ -20,12 +17,5 @@ jobs: - name: Generate Prisma client run: npx prisma generate - - name: Lint - run: npm run lint --if-present || true - - name: Build run: npm run build - - - name: Verify build output - run: | - [ -d dist ] && echo "✅ Build OK" || (echo "❌ dist not found" && exit 1) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bf4dd7d..72a35f7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: Deploy API-Ubigeo +name: Deploy on: push: @@ -7,14 +7,13 @@ on: jobs: deploy: runs-on: self-hosted - steps: - name: Checkout uses: actions/checkout@v4 - - name: Copy source to server + - name: Sync source run: | - rsync -av --delete \ + rsync -a --delete \ --exclude='.git' \ --exclude='node_modules' \ --exclude='dist' \ @@ -25,6 +24,4 @@ jobs: run: bash /home/deployer/deploy-ubigeo.sh - name: Health check - run: | - sleep 10 - curl -f https://api-ubigeo.darkcodex.dev/api/v1/health || exit 1 + run: curl -f https://api-ubigeo.darkcodex.dev/api/v1/health