Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
1.3 kB
1
Indexable
Never
on: push
name: 🚀 Deploy website on push
jobs:
  web-deploy:
    name: 🎉 Deploy
    runs-on: ubuntu-latest
    steps:
      - name: 🚚 Get latest code
        uses: actions/checkout@v4

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: 8.2.0

      - name: 🛠 Update Composer Dependencies
        run: composer update --ignore-platform-reqs

      - name: 🛠 Install Composer dependencies
        run: composer install --ignore-platform-reqs

      - name: 💻 Allow Storage
        run: php artisan storage:link

      - name: 🚀 Dump Autoload Composer
        run: composer dump-autoload

      - name: Use Node.js 21
        uses: actions/setup-node@v2
        with:
          node-version: "21"

      - name: 🔨 Build Project
        run: |
          npm install
          npm run build

      - name: 📂 Sync files
        uses: SamKirkland/FTP-Deploy-Action@v4.3.5
        with:
          server: ${{secrets.ftp_server}}
          username: ${{secrets.ftp_username}}
          password: ${{ secrets.ftp_password }}
          port: ${{secrets.ftp_port}}
          exclude: |
            **/.git*
             **/.git*/**
             **/node_modules/**
             **/vendor/**
             **.env*
Leave a Comment