From 93647a9e059f0fa9c6e43e568f4e77386e63295f Mon Sep 17 00:00:00 2001 From: Neo Date: Wed, 4 Mar 2026 09:23:30 +0000 Subject: [PATCH] Add Gitea CI/CD workflow --- .gitea/workflows/deploy.yml | 24 ++++++++++++++++++++++++ manoonoils-store | 1 + 2 files changed, 25 insertions(+) create mode 100644 .gitea/workflows/deploy.yml create mode 160000 manoonoils-store diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..8aacf94 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,24 @@ +name: Deploy to Production + +on: + push: + branches: [master, main] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Deploy to server + uses: appleboy/ssh-action@v0.1.0 + with: + host: ${{ secrets.HOST }} + username: root + key: ${{ secrets.SSH_KEY }} + script: | + cd /root/manoonoils-store + git pull origin master + npm run build + docker build -t manoonoils-store:latest . + docker stop manoonoils-store && docker rm manoonoils-store + docker run -d --name manoonoils-store -p 3000:3000 --env-file .env.local manoonoils-store:latest + docker network connect coolify manoonoils-store diff --git a/manoonoils-store b/manoonoils-store new file mode 160000 index 0000000..0c70eb0 --- /dev/null +++ b/manoonoils-store @@ -0,0 +1 @@ +Subproject commit 0c70eb06a5f08394234900c6e406d6a6e2a07d01