From 58cec3e440b721c0550e3565819531032254356c Mon Sep 17 00:00:00 2001 From: DilankaHer <117497021+DilankaHer@users.noreply.github.com> Date: Fri, 14 Nov 2025 15:03:21 +0700 Subject: [PATCH] Add GitHub Actions workflow for resource deployment --- .github/workflows/deploy-resources.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/deploy-resources.yml diff --git a/.github/workflows/deploy-resources.yml b/.github/workflows/deploy-resources.yml new file mode 100644 index 0000000..eb3cd47 --- /dev/null +++ b/.github/workflows/deploy-resources.yml @@ -0,0 +1,25 @@ +name: Pull Code On Server + +on: + push: + branches: + - "deploy-resources" + +jobs: + pull_code: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Pull latest code on server + uses: appleboy/ssh-action@v1 + with: + host: ${{ secrets.SERVER_IP }} + username: ${{ secrets.SERVER_USER }} + key: ${{ secrets.SERVER_SSH_KEY }} + script: | + cd /home/dilanka/my_website + git fetch --all + git reset --hard origin/deploy-resources