Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel deploy #462

Open
yannickdirbe opened this issue Jun 7, 2024 · 4 comments
Open

Laravel deploy #462

yannickdirbe opened this issue Jun 7, 2024 · 4 comments

Comments

@yannickdirbe
Copy link

Please can you show how to use on Laravel deployment with files and folders excludes

@solomon-ochepa
Copy link

name: 🚀 Deploye

# Controls when the workflow will run
on:
  # Triggers the workflow on push or pull request events but only for the "main" branch
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]
    types: [closed]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "web-deploy"
  web-deploy:
    name: 🎉 Deploying

    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
    # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
    - name: 🚚 Get latest code
      uses: actions/checkout@v4

    # Runs a command using the runners shell
    - name: Install Dependencies
      run: composer update --ignore-platform-reqs

    - name: NodeJS Packages
      run: npm update; npm run build

    - name: Directory Permissions
      run: chmod -R 775 storage

    - name: Clear Caches
      run: php artisan optimize:clear

    - name: Storage link
      run: php artisan storage:link --force

    - name: 📂 Sync files
      uses: SamKirkland/FTP-Deploy-Action@v4.3.5
      with:
        server: ${{ secrets.FTP_SERVER }}
        username: ${{ secrets.FTP_USERNAME }}
        password: ${{ secrets.FTP_PASSWORD }}
        server-dir: ${{ secrets.FTP_SERVER_DIR }}
        log-level: minimal
        exclude: |
          **/.git*
          **/.git*/**
          **/node_modules/**

@Coho04
Copy link

Coho04 commented Aug 16, 2024

Bro you can use Deployer is better

@yannickdirbe
Copy link
Author

Bro you can use Deployer is better

Thank you @Coho04 ! I will check it.

@SHJordan
Copy link

SHJordan commented Sep 3, 2024

Bro you can use Deployer is better

Thank you @Coho04 ! I will check it.

I believe it will not work for shared hosts without ssh tho, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants