Skip to content

Commit 70a6124

Browse files
committed
fixed deploy to server
1 parent 46354cc commit 70a6124

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
name: Deploy to Server
3434
needs: test
3535
runs-on: ubuntu-latest
36-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
36+
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
3737

3838
steps:
3939
- name: Execute SSH deployment script
@@ -45,6 +45,6 @@ jobs:
4545
script: |
4646
# Replace this path with the actual path to your project on the server
4747
cd /home/ubuntu/learningAPI
48-
git pull origin main
48+
git pull origin ${{ github.ref_name }}
4949
docker-compose down
5050
docker-compose up -d --build

0 commit comments

Comments
 (0)