Skip to content

fix: SamKirkland/FTP-Deploy-Action version #14

fix: SamKirkland/FTP-Deploy-Action version

fix: SamKirkland/FTP-Deploy-Action version #14

Workflow file for this run

name: Pipeline
on:
push:
branches:
- develop
jobs:
ci:
name: Laravel (PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }})
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['8.1', '8.2', '8.3']
steps:
- name: Checkout
uses: actions/checkout@v4
# - name: Setup PHP
# uses: shivammathur/setup-php@v2
# with:
# php-version: ${{ matrix.php-versions }}
# extensions: mbstring, dom, fileinfo, pdo_sqlite
# - name: Install Composer dependencies
# run: composer update --no-progress --prefer-dist --optimize-autoloader
# - name: Prepare the application
# run: |
# php -r "file_exists('.env') || copy('.env.example', '.env');"
# php artisan key:generate
# - name: Directory Permissions
# run: chmod -R 777 storage bootstrap/cache
# - name: Clear Config
# run: php artisan config:clear
# - name: Create Database
# run: touch database/database.sqlite
# - name: Migrate Database
# env:
# DB_CONNECTION: sqlite
# DB_DATABASE: database/database.sqlite
# run: php artisan migrate
# - name: Test with phpunit
# run: vendor/bin/phpunit --testdox
deploy-develop:
name: Deploy to dev Enviroment
runs-on: ubuntu-latest
needs: ci
environment:
name: develop
url: http://pipelinedevelop.phppiaui.com.br
steps:
- name: Deploy
run: echo "Deploying to develop environment"
- name: Deploy to ${{ vars.SERVER_DIR }}
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_HOST }}
username: ${{ secrets.FTP_USER }}
password: ${{ secrets.FTP_PASSWORD }}
server-dir: ${{ vars.SERVER_DIR }}
deploy-homologacao:
name: Deploy to hmg Enviroment
runs-on: ubuntu-latest
needs: deploy-develop
environment:
name: homologacao
url: http://pipelinehomologacao.phppiaui.com.br
steps:
- name: Deploy
run: echo "Deploying to homologacao environment"
deploy-producao:
name: Deploy to prod Enviroment
runs-on: ubuntu-latest
needs: deploy-homologacao
environment:
name: production
url: http://pipeline.phppiaui.com.br
steps:
- name: Deploy
run: echo "Deploying to production environment"