Skip to content

Commit 7b40c61

Browse files
committed
fixed cicd
1 parent 68878cc commit 7b40c61

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/deploy-backend.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [ main ]
66
paths:
77
- 'backend/**'
8+
workflow_dispatch: # Allows you to trigger a deployment manually from the GitHub UI
89

910
jobs:
1011
deploy:
@@ -34,7 +35,7 @@ jobs:
3435
host: ${{ secrets.EC2_HOST }}
3536
username: ubuntu
3637
key: ${{ secrets.EC2_SSH_KEY }}
37-
script: mkdir -p ~/pasteCTL_web/backend
38+
script: mkdir -p /home/ubuntu/pasteCTL_web/backend
3839

3940
- name: Deploy server binary
4041
uses: appleboy/scp-action@v0.1.7
@@ -43,7 +44,7 @@ jobs:
4344
username: ubuntu
4445
key: ${{ secrets.EC2_SSH_KEY }}
4546
source: "./backend/server"
46-
target: "~/pasteCTL_web/backend/"
47+
target: "/home/ubuntu/pasteCTL_web/backend/"
4748
strip_components: 1
4849
overwrite: true
4950

@@ -54,5 +55,5 @@ jobs:
5455
username: ubuntu
5556
key: ${{ secrets.EC2_SSH_KEY }}
5657
script: |
57-
sudo chmod +x ~/pasteCTL_web/backend/server
58-
sudo systemctl restart pasteCTL-backend.service
58+
sudo chmod +x /home/ubuntu/pasteCTL_web/backend/server
59+
sudo systemctl restart pasteCTL-backend.service

0 commit comments

Comments
 (0)