From a9c6365e35c9a57303f04b2ff1fb9d8cb3b8f3e5 Mon Sep 17 00:00:00 2001 From: Lukas <35173609+PHPLukaas@users.noreply.github.com> Date: Thu, 7 Mar 2024 18:21:17 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7:=20tests=20for=20ci=20githubaction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dev.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/dev.yml diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml new file mode 100644 index 0000000..7861838 --- /dev/null +++ b/.github/workflows/dev.yml @@ -0,0 +1,33 @@ +name: SSH Upload and Composer Install + +on: + push: + branches: + - dev + - -ci/ci-cd-for-api + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install SSH key + uses: webfactory/ssh-agent@v0.5.3 + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + + - name: Upload PHP code + run: scp -r . ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }}:/home/julesartd/www/api-dev-edt-3il + + - name: SSH into server and run composer install + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.SERVER_HOST }} + username: ${{ secrets.SERVER_USERNAME }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + script: | + cd /home/julesartd/www/api-dev-edt-3il + composer2 install \ No newline at end of file