We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46354cc commit 70a6124Copy full SHA for 70a6124
1 file changed
.github/workflows/deploy.yml
@@ -33,7 +33,7 @@ jobs:
33
name: Deploy to Server
34
needs: test
35
runs-on: ubuntu-latest
36
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
+ if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
37
38
steps:
39
- name: Execute SSH deployment script
@@ -45,6 +45,6 @@ jobs:
45
script: |
46
# Replace this path with the actual path to your project on the server
47
cd /home/ubuntu/learningAPI
48
- git pull origin main
+ git pull origin ${{ github.ref_name }}
49
docker-compose down
50
docker-compose up -d --build
0 commit comments