FTP-Deploy-Action icon indicating copy to clipboard operation
FTP-Deploy-Action copied to clipboard

New example for Laravel (PHP) project

Open Mavv3006 opened this issue 3 years ago • 4 comments

Please add a new example for a Laravel project.

Mavv3006 avatar Jun 25 '22 10:06 Mavv3006

yes pleaseeee.

bhekor avatar May 10 '23 20:05 bhekor

3rd please :)

ngl5000 avatar Sep 28 '23 02:09 ngl5000

i use this setting on my main.yaml

on: push
name: 🚀 Deploy website on push
jobs:
  web-deploy:
    name: 🎉 Deploy
    runs-on: ubuntu-latest
    steps:
    - name: 🚚 Get latest code
      uses: actions/checkout@v3

    - name: 📂 Sync files
      uses: SamKirkland/[email protected]
      with:
        server: **
        username: **
        protocol: ftps
        port: 21 # todo replace with your web hosts ftps port

on the server side. create user and and folder setting in cpanel directly on laravel folder

zendzo avatar Nov 03 '23 08:11 zendzo

# This is a basic workflow to help you get started with Actions

name: 🚀 Deploye

on:
  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:
  web-deploy:
    name: 🎉 Deploying
    runs-on: ubuntu-latest
    steps:
    - name: 🚚 Get latest code
      uses: actions/checkout@v3

    # - name: Copy .env
    #   run: php -r "file_exists('.env') || copy('.env.example', '.env');"
    # - name: Generate key
    #   run: php artisan key:generate

    - name: Install Dependencies
      run: composer update --ignore-platform-reqs

    - 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/[email protected]
      with:
        server: ${{ secrets.FTP_SERVER }}
        username: ${{ secrets.FTP_USERNAME }}
        password: ${{ secrets.FTP_PASSWORD }}
        server-dir: '/public_html/example/'
        exclude: |
          **/.DS_Store
          **/.env
          **/.git*
          **/.git*/**
          **/.phpunit.cache
          **/.phpunit.result.cache
          **/.idea
          **/.vscode
          **/.dockerignore
          **/.editorconfig
          **/.gitattributes
          **/.gitignore
          **/*.zip
          **/build
          **/compose*.y*
          **/docker-compose*
          **/Dockerfile*
          **/*error*
          **/Homestead.json
          **/Homestead.yaml
          **/node_modules/**
          **/npm-debug.log
          **/public/hot
          **/public/storage
          **/src
          **/storage/*.key
          **/storage/framework/**
          **/storage/logs/**
          **/storage/tenant*/**
          **/*temp/**

solomon-ochepa avatar Nov 28 '23 07:11 solomon-ochepa