Skip to content

Commit

Permalink
action updated
Browse files Browse the repository at this point in the history
  • Loading branch information
basantsd committed Jul 9, 2024
1 parent eadbc43 commit 648ac6c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v2

- name: Run CI job
uses: basantsd/laravel-ci-cd@v2.0.0
uses: basantsd/laravel-ci-cd@v1.2
with:
job: 'ci'
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -31,7 +31,7 @@ jobs:
uses: actions/checkout@v2

- name: Run Code Cleanup job
uses: basantsd/laravel-ci-cd@v2.0.0
uses: basantsd/laravel-ci-cd@v1.2
with:
job: 'code_cleanup'
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -45,7 +45,7 @@ jobs:
uses: actions/checkout@v2

- name: Run CD job
uses: basantsd/laravel-ci-cd@v2.0.0
uses: basantsd/laravel-ci-cd@v1.2
with:
job: 'cd'
vps_private_key: ${{ secrets.VPS_PRIVATE_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: actions/checkout@v2

- name: Run CI job
uses: basantsd/laravel-ci-cd@v2
uses: basantsd/laravel-ci-cd@v1.2
with:
job: 'ci'
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -48,7 +48,7 @@ jobs:
uses: actions/checkout@v2

- name: Run Code Cleanup job
uses: basantsd/laravel-ci-cd@v2
uses: basantsd/laravel-ci-cd@v1.2
with:
job: 'code_cleanup'
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -62,7 +62,7 @@ jobs:
uses: actions/checkout@v2

- name: Run CD job
uses: basantsd/laravel-ci-cd@v2
uses: basantsd/laravel-ci-cd@v1.2
with:
job: 'cd'
vps_private_key: ${{ secrets.VPS_PRIVATE_KEY }}
Expand Down
22 changes: 11 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ runs:
# CD steps
echo "Running CD steps..."
composer install --prefer-dist --no-progress --no-suggest --no-interaction
ssh -o StrictHostKeyChecking=no -i $VPS_PRIVATE_KEY $VPS_USERNAME@$VPS_HOST << EOF
cd $DEPLOY_PATH
sudo chown -R $USER:www-data storage/ bootstrap/cache public/
sudo chmod -R 775 storage bootstrap/cache public/
git reset --hard
git clean -fd
git pull origin $PRODUCTION_BRANCH
/usr/bin/php$PHP_VERSION $(which composer) install --no-dev --prefer-dist --optimize-autoloader
/usr/bin/php$PHP_VERSION artisan optimize
/usr/bin/php$PHP_VERSION artisan optimize:clear
/usr/bin/php$PHP_VERSION artisan storage:link
ssh -o StrictHostKeyChecking=no -i $VPS_PRIVATE_KEY $VPS_USERNAME@$VPS_HOST << 'EOF'
cd $DEPLOY_PATH
sudo chown -R $USER:www-data storage/ bootstrap/cache public/
sudo chmod -R 775 storage bootstrap/cache public/
git reset --hard
git clean -fd
git pull origin $PRODUCTION_BRANCH
/usr/bin/php$PHP_VERSION $(which composer) install --no-dev --prefer-dist --optimize-autoloader
/usr/bin/php$PHP_VERSION artisan optimize
/usr/bin/php$PHP_VERSION artisan optimize:clear
/usr/bin/php$PHP_VERSION artisan storage:link
EOF
elif [ "$job" == "code_cleanup" ]; then
Expand Down

0 comments on commit 648ac6c

Please sign in to comment.