Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertClo committed Aug 10, 2024
1 parent 81eb8f0 commit 6452518
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ jobs:
HOST: ec2-user@${{ secrets.AWS_INSTANCE_IP }}
run: |
ssh -i StrictHostKeyChecking=accept-new ec2-user@${{ secrets.AWS_INSTANCE_IP }} "
# `set -e` stops the execution of the script if a command or pipeline has an error. We need this to make sure
# the GitHub Action reports a failure if something goes wrong.
set -e
# Make sure the latest commit from the main branch is checked out
sudo mkdir -p /opt/albertclo.com
sudo chown -R ec2-user:ec2-user /opt/albertclo.com
cd /opt/albertclo.com
Expand All @@ -31,7 +35,12 @@ jobs:
git checkout main
git fetch origin
git reset --hard origin/main
# Run the docker containers
docker-compose --env-file .env -f infra/docker/docker-compose.yml up -d
# Run build commands
docker-compose --env-file .env -f infra/docker/docker-compose.yml exec php composer install
docker-compose --env-file .env -f infra/docker/docker-compose.yml exec php php artisan migrate
echo 'done'"

0 comments on commit 6452518

Please sign in to comment.