Skip to content

Merge pull request #1494 from bakaphp/refact-tags #28

Merge pull request #1494 from bakaphp/refact-tags

Merge pull request #1494 from bakaphp/refact-tags #28

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: Build
runs-on: ubuntu-latest
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