From 254e71d6589a7149827ee81f8ff10d8807aa32d2 Mon Sep 17 00:00:00 2001 From: Stepan Vladovskiy Date: Fri, 3 Nov 2023 11:54:12 -0300 Subject: [PATCH] feat: in CI/CD pipline --- .gitea/workflows/main.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .gitea/workflows/main.yml diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml new file mode 100644 index 0000000..9cb9ba8 --- /dev/null +++ b/.gitea/workflows/main.yml @@ -0,0 +1,31 @@ +name: 'deploy' +on: + push: + branches: + - main + - dev + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Cloning repo + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Get Repo Name + id: repo_name + run: echo "::set-output name=repo::$(echo ${GITHUB_REPOSITORY##*/})" + + - name: Get Branch Name + id: branch_name + run: echo "::set-output name=branch::$(echo ${GITHUB_REF##*/})" + + - name: Push to dokku + uses: dokku/github-action@master + with: + branch: 'main' + git_remote_url: 'ssh://dokku@staging.discours.io:22/${{ steps.repo_name.outputs.repo }}' + ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} + git_push_flags: '--force'