From 44b6fa30b001ecd2244c0757084ac4b32b288d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=20Poljan=C5=A1ek?= Date: Tue, 9 Sep 2025 19:45:37 +0200 Subject: [PATCH] sprememba pipelinesov --- .gitea/workflows/deploy.yml | 55 ++++++++++++++++++++++++++++++++++++ .gitea/workflows/develop.yml | 28 ------------------ .gitea/workflows/master.yml | 28 ------------------ 3 files changed, 55 insertions(+), 56 deletions(-) create mode 100644 .gitea/workflows/deploy.yml delete mode 100644 .gitea/workflows/develop.yml delete mode 100644 .gitea/workflows/master.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..477d9bb --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,55 @@ +name: Deploy to Production on Develop Push + + on: + push: + branches: + - develop + + jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Deploy to Server via rsync + run: | + mkdir -p ~/.ssh + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + + rsync -avz --delete \ + --exclude=".git/" \ + --exclude=".gitea/" \ + --exclude=".gitignore" \ + -e "ssh -p ${{ secrets.SSH_PORT }} -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no" \ + ./ \ + ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.TARGET_DIR }} + + on: + push: + branches: + - master + + jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Deploy to Server via rsync + run: | + mkdir -p ~/.ssh + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + + rsync -avz --delete \ + --exclude=".git/" \ + --exclude=".gitea/" \ + --exclude=".gitignore" \ + -e "ssh -p ${{ secrets.SSH_PORT }} -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no" \ + ./ \ + ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.TARGET_MASTER_DIR }} \ No newline at end of file diff --git a/.gitea/workflows/develop.yml b/.gitea/workflows/develop.yml deleted file mode 100644 index 9b3cf77..0000000 --- a/.gitea/workflows/develop.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Deploy to Production on Develop Push - - on: - push: - branches: - - develop - - jobs: - deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Deploy to Server via rsync - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - - rsync -avz --delete \ - --exclude=".git/" \ - --exclude=".gitea/" \ - --exclude=".gitignore" \ - -e "ssh -p ${{ secrets.SSH_PORT }} -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no" \ - ./ \ - ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.TARGET_DIR }} \ No newline at end of file diff --git a/.gitea/workflows/master.yml b/.gitea/workflows/master.yml deleted file mode 100644 index f97e62b..0000000 --- a/.gitea/workflows/master.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Deploy to Production on Develop Push - - on: - push: - branches: - - master - - jobs: - deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Deploy to Server via rsync - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - - rsync -avz --delete \ - --exclude=".git/" \ - --exclude=".gitea/" \ - --exclude=".gitignore" \ - -e "ssh -p ${{ secrets.SSH_PORT }} -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no" \ - ./ \ - ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.TARGET_MASTER_DIR }} \ No newline at end of file