Skip to content

Commit

Permalink
using scp-action instead of scp
Browse files Browse the repository at this point in the history
  • Loading branch information
daniloccangucu committed Sep 24, 2024
1 parent 421794f commit bc17d7b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,15 @@ jobs:
- name: Set permissions
run: chmod 600 my-website-server.pem

- name: Copy files to EC2 using SCP
run: |
scp -i my-website-server.pem -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -r build/* ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }}:/var/www/html/
- name: Copy files to EC2
uses: appleboy/[email protected]
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USER }}
key: my-website-server.pem
port: 22
source: "build/*"
target: "/var/www/html/"

- name: Restart Nginx
run: |
Expand Down

0 comments on commit bc17d7b

Please sign in to comment.