Created
January 16, 2022 03:54
-
-
Save mamun724682/119f538aefb1930a8d8b9b6f5d618da9 to your computer and use it in GitHub Desktop.
Github action for laravel shared hosting ftp deploy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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