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

Commit

Permalink
Refactor GitHub action workflow and update cpanel-auto-deploy script …
Browse files Browse the repository at this point in the history
…to improve deployment process and remove unnecessary steps. (#17)
  • Loading branch information
thejmitchener authored Jun 9, 2024
1 parent 440cc55 commit 9a501d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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 :
You can copy the default github action workflow from:

```bash
resources/workfllows/cpanel-auto-deploy.yml into .github/workflows/cpanel-auto-deploy.yml
Expand Down
12 changes: 4 additions & 8 deletions resources/scripts/cpanel-auto-deploy.sh.stub
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ echo "Deployment started..."

git fetch origin --force || true

# Grabbing the current branch name
current_branch=$(git rev-parse --abbrev-ref HEAD)

# Reset to git head commit
git reset --hard origin/"$current_branch"
git reset --hard "@{u}"

# Install composer dependencies
composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader
Expand All @@ -28,14 +24,14 @@ php artisan optimize

# Check if npm is available
if command -v npm >/dev/null 2>&1; then
# Remove node_modules directory
rm -rf ./node_modules

# Install npm dependencies
npm install

# Compile npm assets
npm run build

# Remove node_modules directory
rm -rf ./node_modules
fi

# Run database migrations
Expand Down

0 comments on commit 9a501d6

Please sign in to comment.