Skip to content

Instantly share code, notes, and snippets.

@mamun724682
Created January 16, 2022 03:54
Show Gist options
  • Select an option

  • Save mamun724682/119f538aefb1930a8d8b9b6f5d618da9 to your computer and use it in GitHub Desktop.

Select an option

Save mamun724682/119f538aefb1930a8d8b9b6f5d618da9 to your computer and use it in GitHub Desktop.
Github action for laravel shared hosting ftp deploy
on: push
name: πŸš€ Deploy website on push
jobs:
web-deploy:
name: πŸŽ‰ Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v2
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
# - name: Install Dependencies
# run: composer install --optimize-autoloader --no-dev
# - name: Generate key
# run: php artisan key:generate
# - name: Database Migration
# run: php artisan migrate
- name: Optimize clear
run: php artisan optimize:clear
# - name: Directory Permissions
# run: chmod -R 777 storage bootstrap/cache
- name: πŸ“‚ Sync files
uses: SamKirkland/FTP-Deploy-Action@4.2.0
with:
server: ftp.domain.com
username: ${{ secrets.ftp_username }}
password: ${{ secrets.ftp_password }}
# server-dir:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment