From 723059d73c573a64b1da852cae2c91784461bdff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Tue, 6 Jan 2026 15:09:44 +0200 Subject: [PATCH] Add GitHub Actions workflow for code deployment --- .github/workflows/pull_code.yml | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/pull_code.yml diff --git a/.github/workflows/pull_code.yml b/.github/workflows/pull_code.yml new file mode 100644 index 0000000..10df0cb --- /dev/null +++ b/.github/workflows/pull_code.yml @@ -0,0 +1,35 @@ +name: Pull Code + +on: + push: + branches: + - dev_odex_base + - dev_odex_hr + - dev_odex30_accounting + + workflow_dispatch: + inputs: + environment: + description: 'Select Server' + required: true + type: choice + options: + - dev + default: dev + +jobs: + + deploy_dev_server: + name: Deploy to dev server <159.89.22.77> + runs-on: odex30-runner + if: | + (github.ref == 'refs/heads/dev_odex_base' || github.ref == 'refs/heads/dev_odex_hr' || github.ref == 'dev_odex30_accounting') && + (github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && github.event.inputs.environment != '')) + + steps: + - name: Checkout And Restart Project + run: | + echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}" + sudo chmod +x /home/${{ secrets.CLIENT_USER }}/scripts/pull/pull_code.sh + sudo /home/${{ secrets.CLIENT_USER }}/scripts/pull/pull_code.sh