Skip to content

Definir versão do PHP #2

Definir versão do PHP

Definir versão do PHP #2

Workflow file for this run

name: Deploy API Cep via SSH
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: mbstring, xml, bcmath, curl, gd, mysql, mysqli, zip, composer
coverage: none
- name: Optimize Laravel Cache
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: |
cd ${{ secrets.SSH_TARGET }}
php artisan config:cache
php artisan route:cache
php artisan view:cache
- name: Install dependencies
run: |
composer install --no-dev --optimize-autoloader
- name: Deploy to Server via SSH
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
source: ./*
target: ${{ secrets.SSH_TARGET }}
- name: Run Migrations on Server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: |
cd ${{ secrets.SSH_TARGET }}
php artisan migrate --force