Поддержка android платформы для обновления
Some checks failed
Build rosetta-sdu / build (push) Failing after 8s

This commit is contained in:
RoyceDa
2026-02-26 19:22:56 +02:00
parent 91b7cfa911
commit f6eded56f0
3 changed files with 75 additions and 2 deletions

View File

@@ -0,0 +1,61 @@
name: Build rosetta-sdu
on:
push:
branches:
- main
workflow_dispatch:
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
- 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: Build with Maven
run: mvn clean package
- name: List build directory
run: ls -la build/
- name: Deploy to server via SSH
uses: appleboy/scp-action@v1
with:
host: ${{ secrets.SDU_SSH_HOST }}
username: ${{ secrets.SDU_SSH_USER }}
password: ${{ secrets.SDU_SSH_PASSWORD }}
port: ${{ secrets.SDU_SSH_PORT }}
source: "build/*"
target: ${{ secrets.SDU_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.SDU_SSH_HOST }}
username: ${{ secrets.SDU_SSH_USER }}
password: ${{ secrets.SDU_SSH_PASSWORD }}
port: ${{ secrets.SDU_SSH_PORT }}
script: |
cd ${{ secrets.SDU_DEPLOY_PATH }}
docker-compose down
docker compose up -d --build