diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml new file mode 100644 index 0000000..ee4b8a6 --- /dev/null +++ b/.gitea/workflows/action.yaml @@ -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 diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..736eff5 --- /dev/null +++ b/deploy.sh @@ -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