From e4b3c33ae8383f6d30b24d13042454ffb2cf67b8 Mon Sep 17 00:00:00 2001 From: VladYoSlav Date: Sat, 22 Jun 2024 21:36:26 +0300 Subject: [PATCH] feat(cd): pull workflow --- .github/workflows/pull.yaml | 20 ++++++++++++++++++++ README.md | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pull.yaml diff --git a/.github/workflows/pull.yaml b/.github/workflows/pull.yaml new file mode 100644 index 0000000..190adce --- /dev/null +++ b/.github/workflows/pull.yaml @@ -0,0 +1,20 @@ +name: Pull the git repository on the server +on: + push: + branches: + - main +jobs: + pull: + runs-on: ubuntu-latest + steps: + - name: Pull the git repository with ssh + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USERNAME }} + password: ${{ secrets.SSH_PASSWORD }} + port: ${{ secrets.SSH_PORT }} + script: git --work-tree=$WORK_TREE --git-dir=$GIT_DIR pull + env: + WORK_TREE: ${{ vars.PROJECT_DIR }} + GIT_DIR: ${{ vars.PROJECT_DIR }}/.git \ No newline at end of file diff --git a/README.md b/README.md index 85184bf..a825eef 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ make init ``` -**Don't forget to change values in .env** +### Don't forget to change values in .env ## Commands