Skip to content

Commit

Permalink
Merge pull request #47 from ClothingStoreService/chore/adjust-nginx-i…
Browse files Browse the repository at this point in the history
…mage

chore: home/ubuntu/로 복사 후 SSH를 사용해 sudo로 파일을 /etc/nginx/conf.d/로 이동
  • Loading branch information
Ogu1208 authored Sep 5, 2024
2 parents a577ad6 + 6423a45 commit 30e09d0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/dev-aws-CI-CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,26 @@ jobs:
- name: Show docker-compose.yml Content
run: cat docker-compose.yml # docker-compose.yml 파일 내용 확인

- name: Send docker-compose.yml
# Send nginx.conf to a temporary location
- name: Send nginx.conf to Home Directory
uses: appleboy/scp-action@master
with:
username: ubuntu
host: ${{ secrets.AWS_DEV_HOSTNAME }}
key: ${{ secrets.AWS_DEV_PRIVATE_KEY }}
source: "./docker-compose.yml"
source: "./nginx/conf.d/nginx.conf"
target: "/home/ubuntu/"

- name: Send nginx.conf
uses: appleboy/scp-action@master
# Move nginx.conf from Home Directory to /etc/nginx/conf.d
- name: Move nginx.conf to /etc/nginx/conf.d
uses: appleboy/ssh-action@master
with:
username: ubuntu
host: ${{ secrets.AWS_DEV_HOSTNAME }}
key: ${{ secrets.AWS_DEV_PRIVATE_KEY }}
source: "./nginx/conf.d/nginx.conf"
target: "/etc/nginx/conf.d/"
script: |
sudo mkdir -p /etc/nginx/conf.d/
sudo mv /home/ubuntu/nginx.conf /etc/nginx/conf.d/nginx.conf
## Docker login
- name: Docker Login
Expand Down

0 comments on commit 30e09d0

Please sign in to comment.