Update deploy.yml #5
This file contains 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
name: Deploy Laravel Project on push | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
web-deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get the latest code | |
uses: actions/[email protected] | |
- uses: actions/setup-node@master | |
- name: Copy .env | |
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | |
- name: Install Dependencies | |
run: composer update --ignore-platform-reqs | |
- name: Generate key | |
run: php artisan key:generate | |
- name: Generate storage link | |
run: php artisan storage:link | |
- name: Directory Permissions | |
run: chmod -R 777 storage bootstrap/cache | |
- name: Run DB migrate and seeder | |
run: php artisan migrate:fresh --seed | |
- name: 📂 Sync files | |
uses: SamKirkland/[email protected] | |
with: | |
server: ${{ secrets.FTP_SERVER }} | |
username: ${{ secrets.FTP_USERNAME }} | |
password: ${{ secrets.FTP_PASSWORD }} | |
server-dir: / |