From 82924dd3e51140058faac34c81f635498194b2ce Mon Sep 17 00:00:00 2001 From: Edy kurniawan Date: Mon, 16 Dec 2024 09:43:47 +0700 Subject: [PATCH] Create cd.yml --- .github/workflows/cd.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..d3143b1 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,26 @@ +name: Laravel CD + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: executing remote ssh commands using password + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + port: ${{ secrets.PORT }} + script: | + cd /var/www/app-monitoring + git pull origin main + composer install --no-interaction --prefer-dist --optimize-autoloader + php artisan config:clear