Skip to content

Merge pull request #1496 from bakaphp/fix-docker-compose-dev #29

Merge pull request #1496 from bakaphp/fix-docker-compose-dev

Merge pull request #1496 from bakaphp/fix-docker-compose-dev #29

Workflow file for this run

name: Deploy to EC2
on:
push:
branches:
- 'development'
workflow_dispatch:
jobs:
deploy-to-ec2:
runs-on: ubuntu-latest
environment: ${{ github.ref_name }}
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Copy folder content recursively to remote VM
uses: appleboy/[email protected]
with:
host: ${{ secrets.AWS_EC2_HOST }}
username: ${{ secrets.AWS_EC2_USERNAME }}
key: ${{ secrets.AWS_EC2_PRIVATE_SSH_KEY }}
source: .
target: ${{secrets.AWS_EC2_TARGET_DIR}}
laravel-command:
name: Clear cache Laravel
runs-on: ubuntu-latest
environment: ${{ github.ref_name }}
steps:
- name: executing remote ssh commands using password
uses: appleboy/[email protected]
with:
host: ${{ secrets.AWS_EC2_HOST }}
username: ${{ secrets.AWS_EC2_USERNAME }}
key: ${{ secrets.AWS_EC2_PRIVATE_SSH_KEY }}
script: |
docker exec -it phpkanvas-ecosystem php artisan lighthouse:cache && php artisan config:cache