55 push :
66 branches :
77 - main
8- - tobias/create-github-actions-for-deployment
98 workflow_dispatch :
109 inputs :
1110 branch :
2120 deploy-test :
2221 name : Deploy to test environment
2322 runs-on : ubuntu-latest
24- if : github.event_name == 'push' || github.event_name == ' workflow_dispatch'
23+ if : github.event_name == 'workflow_dispatch'
2524 steps :
2625 - name : Deploy to test server
2726@@ -39,17 +38,18 @@ jobs:
3938 $HOME/scripts/deploy.sh -b ${{ github.event.inputs.branch }}
4039 fi
4140
42- # deploy-production:
43- # name: Deploy to production environment
44- # runs-on: ubuntu-latest
45- # environment: production
46- # if: github.event_name == 'push'
47-
48- # steps:
49- # - name: Deploy to production server
50- # uses: appleboy/[email protected] 51- # with:
52- # key: ${{ secrets.SSH_KEY }}
53- # script: |
54- # # Run the deploy script with the specified branch
55- # $HOME/scripts/deploy.sh -b ${{ github.event.inputs.branch }}
41+ deploy-production :
42+ name : Deploy to production environment
43+ runs-on : ubuntu-latest
44+ environment : production
45+ if : github.event_name == 'push'
46+ steps :
47+ - name : Deploy to production server
48+ 49+ with :
50+ key : ${{ secrets.SSH_KEY }}
51+ username : voko
52+ host : leden.vokoutrecht.nl
53+ script : |
54+ # Run the deploy script with the specified branch
55+ $HOME/scripts/deploy.sh -b ${{ github.event.inputs.branch }}
0 commit comments