编译版

This commit is contained in:
unknown 2024-07-05 02:12:41 +08:00
parent 9004b72ba2
commit 17ca749ac9
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,14 @@
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: linux
steps:
- name: Build & Deploy
run: rm -rf /opt/workspace/RuralDatabase
- name: Clone Repository
run: git clone http://127.0.0.1:3000/topverse/RuralDatabase.git /opt/workspace/RuralDatabase
- name: Deploy
run: cd /opt/workspace/RuralDatabase && chmod +x deploy.sh && ./deploy.sh

10
deploy.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
docker build -t rural-v1:latest "."
docker rm -f rural-v1 || true
docker run -d -p 3000:13333 --restart=unless-stopped --name rural-v1 rural-v1
docker rmi $(docker images -f "dangling=true" -q) || true
docker ps