Skip to content

Commit

Permalink
fixed workflow error with path
Browse files Browse the repository at this point in the history
  • Loading branch information
Songmin17 committed Nov 28, 2023
1 parent 9823211 commit 87614ac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/docker_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
docker build -t "${{ secrets.DOCKER_USERNAME }}/haengsha-backend:latest" .
docker push "${{ secrets.DOCKER_USERNAME }}/haengsha-backend:latest"
- name: Add SSH key for EC2 instance
run: |
mkdir -p ~/.ssh
ssh-keyscan -H ${{ secrets.CLOUD_URL }} >> ~/.ssh/known_hosts
- name: Stop Docker Container, Clean Up, Pull & Run
run: |
set +x
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ml_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
echo "${{ secrets.PEM }}" > key.pem
set -x
chmod 600 key.pem
rsync -avz -e "ssh -o StrictHostKeyChecking=no -i ./key.pem" ./recommend/ ec2-user@${{ secrets.CLOUD_URL }}:/recommend/
rsync -avz -e "ssh -o StrictHostKeyChecking=no -i ./key.pem" ./recommend/ ec2-user@${{ secrets.CLOUD_URL }}:/home/ec2-user/recommend/
- name: Restart ML Container & Mount Code
run: |
Expand Down
6 changes: 3 additions & 3 deletions recommend/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
set -e

# Set environment variables for S3 bucket and file paths
S3_BUCKET=${S3_BUCKET}
EVENT_FILE="eventData.csv"
USER_FILE="userData.csv"
# S3_BUCKET=${S3_BUCKET}
# EVENT_FILE="eventData.csv"
# USER_FILE="userData.csv"

# Use AWS CLI to download the CSV file from S3
aws s3 cp s3://${S3_BUCKET}/${EVENT_FILE} /app/
Expand Down

0 comments on commit 87614ac

Please sign in to comment.