Skip to content
This repository has been archived by the owner on Jan 26, 2025. It is now read-only.

Commit

Permalink
Merge branch 'main' into polish-package
Browse files Browse the repository at this point in the history
  • Loading branch information
thejmitchener authored Jun 13, 2024
2 parents a03acef + e166a8b commit e650f18
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: List Installed Dependencies
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to `laravel-cpanel-auto-deploy` will be documented in this file.

## v0.0.9 - 2024-06-09

### What's Changed

* Fix command by @thejmitchener in https://github.com/fuelviews/laravel-cpanel-auto-deploy/pull/20

**Full Changelog**: https://github.com/fuelviews/laravel-cpanel-auto-deploy/compare/v0.0.8...v0.0.9

## v0.0.8 - 2024-06-09

### What's Changed
Expand Down
14 changes: 12 additions & 2 deletions src/Commands/InstallWorkflowCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,23 @@ class InstallWorkflowCommand extends Command

public function handle(): bool
{
$source = resource_path('workflows/cpanel-auto-deploy.yml.stub');
// Adjust the source path to be relative to the package's base directory
$source = __DIR__.'/../../resources/workflows/cpanel-auto-deploy.yml.stub';
$destination = base_path('.github/workflows/cpanel-auto-deploy.yml');

// Check if source file exists
if (! File::exists($source)) {
$this->error('Source file does not exist: '.$source);

return 1;
}

$directory = dirname($destination);

if (! File::exists($directory)) {
File::makeDirectory($directory);
if (! File::makeDirectory($directory, 0755, true)) {
$this->error('Failed to create directories: '.$directory);
}
}

if (File::copy($source, $destination)) {
Expand Down

0 comments on commit e650f18

Please sign in to comment.