Add .gitea/workflows/deploy.yml
This commit is contained in:
parent
84617b98a9
commit
7eca4607ca
30
.gitea/workflows/deploy.yml
Normal file
30
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
name: Gitea Actions
|
||||||
|
run-name: ${{ gitea.actor }}
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Explore-Gitea-Actions:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: http://172.23.112.123:3000/actions/checkout@main
|
||||||
|
- name: List files in the repository
|
||||||
|
run: |
|
||||||
|
ls ${{ gitea.workspace }}
|
||||||
|
- name: Build with Maven using Docker
|
||||||
|
run: |
|
||||||
|
docker run --rm -v "$(pwd)":/usr/src/app -v /data/app/maven-repo:/root/.m2/repository -w /usr/src/app maven:3.9.9-eclipse-temurin-17 mvn clean install -Dmaven.test.skip=true
|
||||||
|
- run:
|
||||||
|
ls
|
||||||
|
- name: Configure SSH key
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
||||||
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
ssh-keyscan your-server >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
|
- name: Copy JAR to remote server
|
||||||
|
run: |
|
||||||
|
scp -o StrictHostKeyChecking=no target/my-app.jar user@your-server:/opt/my-app/my-app.jar
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user