name: Build rosetta-wss run-name: Build and Deploy WSS on: push: branches: - main workflow_dispatch: jobs: build: runs-on: java-builders container: image: maven:3.9.9-eclipse-temurin-21 steps: - name: Install Node.js (required for JS actions) run: | apt-get update apt-get install -y curl ca-certificates git curl -fsSL https://deb.nodesource.com/setup_20.x | bash - apt-get install -y nodejs node -v npm -v git --version - name: Checkout code uses: actions/checkout@v4 - name: Build with Maven 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: host: ${{ secrets.WSS_SSH_HOST }} username: ${{ secrets.WSS_SSH_USER }} password: ${{ secrets.WSS_SSH_PASSWORD }} port: ${{ secrets.WSS_SSH_PORT }} source: "build/*" target: ${{ secrets.WSS_DEPLOY_PATH }} strip_components: 1 rm: false debug: true flatten: true - name: Restart Docker containers uses: appleboy/ssh-action@v1.2.5 with: host: ${{ secrets.WSS_SSH_HOST }} username: ${{ secrets.WSS_SSH_USER }} password: ${{ secrets.WSS_SSH_PASSWORD }} port: ${{ secrets.WSS_SSH_PORT }} script: | cd ${{ secrets.WSS_DEPLOY_PATH }} docker compose down docker compose up -d --build