Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Latest commit

 

History

45 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Auto Deploy

Deploy Laravel Application to Server via SSH by RSync

This project is fork from Charliex2/laravel-deploy-x with some change:

  • Fix rsync command;

Default Artisan Commands

php artisan cache:clear 
php artisan route:cache
php artisan config:cache

All commands above are executed in the default order.

Custom Artisan Commands

Custom commands can be executed after default artisan command. Custom commands could be added in the .github/workflows/deploy.yml file.

Config example:

.github/workflows/deploy.yml

name: Deploy to production
on:
  push:
    branches: [ "develop" ]

jobs:
  build:
    name: Buid & Deploy
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@master
      - name: Setup Environment
        uses: shivammathur/setup-php@v2
        with:
          php-version: '8.1'
      - name: Install Composer Packages
        run: composer install --no-dev
      - name: Setup Node.js
        uses: actions/setup-node@v2-beta
        with:
          node-version: '16'
          check-latest: true
      - name: Install NPM dependencies

        run: npm install

      - name: Compile assets for production

        run: npm run production

      - name: Deploy To production
        uses: hypertech-lda/laravel-auto-deploy@1.1
        with:
          user: ${{ secrets.SERVER_USER }}
          host: ${{ secrets.SERVER_HOST }}
          path: ${{ secrets.SERVER_PATH }}
          owner: www
          commands: "# Customer commands"
        env:
          DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}



About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages