From e30d4d320a01e25713e40664f6bf1376950e15ea Mon Sep 17 00:00:00 2001 From: Sergey Elpashev Date: Sun, 18 Feb 2024 19:17:41 +0300 Subject: [PATCH] asdfgdasfsa --- .gitea/workflows/serve.yml | 20 +++++++++++++++++++- .github/workflows/serve.yml | 33 --------------------------------- 2 files changed, 19 insertions(+), 34 deletions(-) delete mode 100644 .github/workflows/serve.yml diff --git a/.gitea/workflows/serve.yml b/.gitea/workflows/serve.yml index b17de5b..eea1318 100644 --- a/.gitea/workflows/serve.yml +++ b/.gitea/workflows/serve.yml @@ -30,4 +30,22 @@ jobs: backend db - name: Run the Docker image - run: SERVER_PORT=3005 docker compose up -d backend db redis \ No newline at end of file + run: SERVER_PORT=3005 docker compose up -d backend db redis --build + + deploy: + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + port: ${{ secrets.PORT }} + script: | + cd /home/sergey/test-repo + git fetch + git pull + git submodule update --recursive + SERVER_PORT=3005 docker compose up -d backend db redis \ No newline at end of file diff --git a/.github/workflows/serve.yml b/.github/workflows/serve.yml deleted file mode 100644 index b17de5b..0000000 --- a/.github/workflows/serve.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Aboba - -on: - push: - branches: [test] - -jobs: - build: - runs-on: ubuntu-latest - container: - image: catthehacker/ubuntu:act-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Docker BuildX - uses: docker/setup-buildx-action@v3 - - - name: Git Submodule Update - run: git submodule update --init --recursive - - - name: Copy .env file - run: cp .env.example .env - - - name: Build the Docker image - uses: isbang/compose-action@v1.5.1 - with: - compose_file: "./docker-compose.yml" - services: | - backend - db - - name: Run the Docker image - run: SERVER_PORT=3005 docker compose up -d backend db redis \ No newline at end of file