Skip to content

text color change

text color change #31

name: Deploy to FTP
on:
push:
branches:
- startup-company
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
- name: Install Composer dependencies
run: composer install --no-dev --prefer-dist --no-scripts --no-progress --no-interaction
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: "18"
- name: Install npm dependencies
run: npm ci
- name: Copy .env.example to .env
run: cp .env.example .env
- name: Set environment variables
run: |
echo "DB_DATABASE=${{ secrets.DB_DATABASE }}" >> .env
echo "DB_USERNAME=${{ secrets.DB_USERNAME }}" >> .env
echo "DB_PASSWORD=${{ secrets.DB_PASSWORD }}" >> .env
echo "APP_URL=${{ secrets.APP_URL }}" >> .env
echo "ASSET_URL=${{ secrets.APP_URL }}" >> .env
echo "PUBLIC_URL=${{ secrets.APP_URL }}" >> .env
echo "APP_ENV=production" >> .env
echo "APP_NAME=SNMLeathers" >> .env
echo "APP_DEBUG=false" >> .env
echo "LOG_VIEWER_ENABLED=true" >> .env
echo "LOG_VIEWER_CACHE_DRIVER=file" >> .env
echo "TELESCOPE_ENABLED=false" >> .env
echo "ACTIVITY_LOGGER_ENABLED=true" >> .env
- name: Generate application key
run: php artisan key:generate
- name: Create storage directories on FTP server
run: |
echo "mkdir storage/app" | ftp -n ${{ secrets.FTP_SERVER }}
echo "mkdir storage/framework" | ftp -n ${{ secrets.FTP_SERVER }}
echo "mkdir storage/logs" | ftp -n ${{ secrets.FTP_SERVER }}
echo "mkdir storage/temp" | ftp -n ${{ secrets.FTP_SERVER }}
echo "mkdir storage/debugbar" | ftp -n ${{ secrets.FTP_SERVER }}
- name: Storage Link
run: php artisan storage:link
- name: Build assets with npm
run: npm run build
- name: Exclude node_modules directory
run: |
rm -rf node_modules
echo "node_modules/" >> .gitignore
- name: Deploy to FTP
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
protocol: ftps
port: 21
server_dir: /public_html # Change this to the desired deployment directory
local_dir: ./public
dangerous-clean-slate: true
synchronize: true
exclude: |
**/.git*
**/.git*/**
**/node_modules/**