Skip to content

Merge pull request #1510 from bakaphp/hotfix-variant-sku-validation #42

Merge pull request #1510 from bakaphp/hotfix-variant-sku-validation

Merge pull request #1510 from bakaphp/hotfix-variant-sku-validation #42

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}}
docker-command:
name: Docker commands
runs-on: ubuntu-latest
needs: deploy-to-ec2
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: |
cd ${{secrets.AWS_EC2_TARGET_DIR}}
docker compose -f docker-compose.dev.yml up -d
docker exec -i phpkanvas-ecosystem php artisan lighthouse:cache
docker exec -i phpkanvas-ecosystem php artisan config:cache