From 345014c3426e2cb687543250d4c996dd0cf96702 Mon Sep 17 00:00:00 2001 From: Solomon Ochepa Date: Tue, 28 Nov 2023 18:03:03 -0800 Subject: [PATCH 1/2] Update README.md Add an example for Laravel app deployment. --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/README.md b/README.md index f7792a4..c7a054f 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,58 @@ jobs: password: ${{ secrets.password }} ``` +## Laravel +#### Build and Publish Laravel Website +```yml +# 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/FTP-Deploy-Action@v4.3.4 + with: + server: ${{ secrets.FTP_SERVER }} + username: ${{ secrets.FTP_USERNAME }} + password: ${{ secrets.FTP_PASSWORD }} + server-dir: '/public_html/example/' +``` + #### FTPS ```yml on: push From ad6c1c6277c78aec905d6cad721b3387416203ff Mon Sep 17 00:00:00 2001 From: Solomon Ochepa Date: Tue, 30 Jan 2024 11:24:58 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c7a054f..09238a8 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ jobs: runs-on: ubuntu-latest steps: - name: 🚚 Get latest code - uses: actions/checkout@v3 + uses: actions/checkout@v4 # - name: Copy .env # run: php -r "file_exists('.env') || copy('.env.example', '.env');" @@ -155,7 +155,7 @@ jobs: server: ${{ secrets.FTP_SERVER }} username: ${{ secrets.FTP_USERNAME }} password: ${{ secrets.FTP_PASSWORD }} - server-dir: '/public_html/example/' + server-dir: '/public_html/example.com/' ``` #### FTPS