Skip to content

Commit

Permalink
chore: aws-cicd.yml 권한 부분 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
clean2001 committed Oct 26, 2024
1 parent ac8af8d commit 1c98f32
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/aws-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,34 @@ jobs:
# echo "${GOOGLE_CREDENTIALS}" > ./layer-api/src/main/resources/tokens/StoredCredential
# echo "${GOOGLE_CREDENTIALS}" > ./layer-api/infra/aws/StoredCredential

- name: Archive Files
run: |
tar -cvzf layer-api.tar.gz ./layer-api/infra/aws/
- name: Send Docker Compose
uses: appleboy/scp-action@master
with:
host: ${{ secrets.AWS_INSTANCE_HOST }}
username: ubuntu
key: ${{ secrets.AWS_INSTANCE_PEM }}
port: 22
source: "./layer-api/infra/aws/*"
source: "layer-api.tar.gz"
target: "/home/ubuntu"

- name: Extract Files on Server and Set Permissions
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.AWS_INSTANCE_HOST }}
username: ubuntu
key: ${{ secrets.AWS_INSTANCE_PEM }}
port: 22
script: |
cd /home/ubuntu
tar -xvzf layer-api.tar.gz
sudo chmod -R 755 /home/ubuntu/layer-api/infra/aws
sudo chown -R ubuntu:ubuntu /home/ubuntu/layer-api/infra/aws
- name: Set Permissions on Transferred Files
uses: appleboy/ssh-action@master
with:
Expand Down

0 comments on commit 1c98f32

Please sign in to comment.