From 37f6b0bd1d74c1363ef28e0258fefe733025f406 Mon Sep 17 00:00:00 2001 From: RoyceDa Date: Sun, 22 Mar 2026 19:38:24 +0200 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BB=D1=83=D1=87=D1=88=D0=B5=D0=BD?= =?UTF-8?q?=D0=BD=D1=8B=D0=B9=20CI/CD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build.yaml | 55 ++++++++++++------------------------- 1 file changed, 18 insertions(+), 37 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index ded02dd..df1b44d 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,5 +1,6 @@ name: Build rosetta-wss run-name: Build and Deploy WSS + on: push: branches: @@ -9,42 +10,23 @@ on: jobs: build: runs-on: java-builders - steps: - - name: Install Node.js - run: | - if command -v apt-get &> /dev/null; then - sudo apt-get update && sudo apt-get install -y nodejs npm - elif command -v brew &> /dev/null; then - brew install node - fi + container: + image: maven:3.9.9-eclipse-temurin-21 + + steps: - name: Checkout code - uses: actions/checkout@v6 - - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'temurin' - cache: maven - - name: Install maven IF not Exists - run: | - if ! command -v mvn &> /dev/null; then - echo "Maven not found, installing..." - if command -v apt-get &> /dev/null; then - sudo apt-get update && sudo apt-get install -y maven - elif command -v brew &> /dev/null; then - brew install maven - fi - else - echo "Maven is already installed." - fi + uses: actions/checkout@v6 + - name: Build with Maven - run: mvn clean package - - - name: List build directory - run: ls -la build/ - + run: mvn -B clean package + + - name: List build artifacts + run: | + ls -la + ls -la target || true + ls -la build || true + - name: Deploy to server via SSH uses: appleboy/scp-action@v1 with: @@ -58,7 +40,7 @@ jobs: rm: false debug: true flatten: true - + - name: Restart Docker containers uses: appleboy/ssh-action@v1.2.5 with: @@ -68,6 +50,5 @@ jobs: port: ${{ secrets.WSS_SSH_PORT }} script: | cd ${{ secrets.WSS_DEPLOY_PATH }} - docker-compose down - docker compose up -d --build - \ No newline at end of file + docker compose down + docker compose up -d --build \ No newline at end of file