SmartParks/.gitea/workflows/dev.yml
bichangxiong f9a7990de9
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 7m20s
更新 .gitea/workflows/dev.yml
2025-07-04 17:44:53 +08:00

66 lines
2.0 KiB
YAML

name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
# env:
# HTTP_PROXY: http://192.168.1.219:7890
# HTTPS_PROXY: http://192.168.1.219:7890
# NO_PROXY: localhost,127.0.0.1
steps:
- name: Checkout code
uses: actions/checkout@v4 # 拉取代码到工作目录
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
# - name: Cache Maven dependencies
# uses: actions/cache@v3
# with:
# path: ~/.m2/repository
# key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
# restore-keys: |
# ${{ runner.os }}-maven-
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.8.2
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
# - name: Set up JDK
# uses: actions/setup-java@v3
# with:
# java-version: '17'
# distribution: 'temurin'
# - name: Build with Maven
# run: mvn clean package
- name: Install dependencies
run: mvn clean package -DskipTests
- name: copy file via ssh password
uses: appleboy/scp-action@v0.1.7
with:
host: 192.168.1.3
username: root
password: by@2025!
port: 22
source: "RuoYi-Cloud-Plus/ruoyi-modules/Property/target/Property.jar,RuoYi-Cloud-Plus/ruoyi-modules/Property/docker-compose.yml,Dockerfile"
target: "/home/runner/plus/"
- name: Deploy to server via SSH
uses: appleboy/ssh-action@v0.1.7
with:
host: 192.168.1.220
username: root
password: 2003moc
port: 22
script: |
cd /home/runner/plus
docker-compose up -d --force-recreate
- run: echo "🍏 This job's status is ${{ job.status }}."