From d2152b347a854468f47e2dc766b661c3de4bca34 Mon Sep 17 00:00:00 2001 From: thejmitchener Date: Wed, 5 Jun 2024 18:45:22 -0400 Subject: [PATCH] Refactor README.md and composer.json for Laravel cpanel auto deploy package, updating descriptions and dependencies. --- README.md | 10 +++++++--- composer.json | 12 +++++------- resources/workflows/cpanel-auto-deploy.yml.stub | 6 +++++- tests/ExampleTest.php | 5 ----- 4 files changed, 17 insertions(+), 16 deletions(-) delete mode 100644 tests/ExampleTest.php diff --git a/README.md b/README.md index 8b21a5a..289d0c5 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# Laravel cpanel auto deploy package. +# Laravel cpanel auto deploy package [![Latest Version on Packagist](https://img.shields.io/packagist/v/fuelviews/laravel-cpanel-auto-deploy.svg?style=flat-square)](https://packagist.org/packages/fuelviews/laravel-cpanel-auto-deploy) [![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/fuelviews/laravel-cpanel-auto-deploy/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/fuelviews/laravel-cpanel-auto-deploy/actions?query=workflow%3Arun-tests+branch%3Amain) [![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/fuelviews/laravel-cpanel-auto-deploy/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/fuelviews/laravel-cpanel-auto-deploy/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain) [![Total Downloads](https://img.shields.io/packagist/dt/fuelviews/laravel-cpanel-auto-deploy.svg?style=flat-square)](https://packagist.org/packages/fuelviews/laravel-cpanel-auto-deploy) -Laravel cpanel auto deploy package streamlines the deployment process for laravel applications on cpanel hosting environments. +Laravel cpanel auto deploy package streamlines the deployment process for laravel applications on dedicated whm/cpanel hosting environments. ## Installation @@ -15,7 +15,11 @@ You can require the package and it's dependencies via composer: composer require fuelviews/laravel-cpanel-auto-deploy ``` -You can copy the default github action workflow from resources/workfllows/cpanel-auto-deploy.yml into .github/workflows/cpanel-auto-deploy.yml +You can copy the default github action workflow from : + +```bash +resources/workfllows/cpanel-auto-deploy.yml into .github/workflows/cpanel-auto-deploy.yml +``` **Default github action workflow triggers on PR to development branch diff --git a/composer.json b/composer.json index 28d66fb..fe3b5e4 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "fuelviews/laravel-cpanel-auto-deploy", - "description": "Fuelviews cpanel auto deploy package.", + "description": "Laravel cpanel auto deploy package", "keywords": [ "Fuelviews", "laravel", @@ -17,8 +17,7 @@ ], "require": { "php": "^8.2", - "spatie/laravel-package-tools": "^1.16", - "illuminate/contracts": "^10.0||^11.0" + "spatie/laravel-package-tools": "^1.16" }, "require-dev": { "laravel/pint": "^1.14", @@ -34,8 +33,7 @@ }, "autoload": { "psr-4": { - "Fuelviews\\CpanelAutoDeploy\\": "src/", - "Fuelviews\\CpanelAutoDeploy\\Database\\Factories\\": "database/factories/" + "Fuelviews\\CpanelAutoDeploy\\": "src/" } }, "autoload-dev": { @@ -79,6 +77,6 @@ } } }, - "minimum-stability": "dev", + "minimum-stability": "stable", "prefer-stable": true -} \ No newline at end of file +} diff --git a/resources/workflows/cpanel-auto-deploy.yml.stub b/resources/workflows/cpanel-auto-deploy.yml.stub index 7ef4d14..3b3e20e 100644 --- a/resources/workflows/cpanel-auto-deploy.yml.stub +++ b/resources/workflows/cpanel-auto-deploy.yml.stub @@ -1,10 +1,14 @@ name: "cPanel Auto Deploy" on: + push: + branches: + - main pull_request: types: [closed] branches: - development + - main paths-ignore: - 'CHANGELOG.md' @@ -24,7 +28,7 @@ jobs: script: "cd $HOME/app && /bin/chmod +x ./cpanel-auto-deploy.sh && ./cpanel-auto-deploy.sh" deploy-production: - if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' + if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main')) runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/tests/ExampleTest.php b/tests/ExampleTest.php deleted file mode 100644 index 5d36321..0000000 --- a/tests/ExampleTest.php +++ /dev/null @@ -1,5 +0,0 @@ -toBeTrue(); -});