Skip to content

Commit

Permalink
ci(deploy): move host from secret to env
Browse files Browse the repository at this point in the history
  • Loading branch information
timoknapp committed Sep 10, 2024
1 parent c04772c commit 34d750d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
branches:
- master

env:
HOST: ${{ secrets.HOST }}
PORT: ${{ secrets.PORT }}

name: Build Tennis Backend
jobs:
build:
Expand All @@ -35,10 +39,10 @@ jobs:
uses: appleboy/[email protected]
if: github.event_name != 'pull_request'
with:
host: ${{ secrets.HOST }}
host: ${{ env.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.PORT }}
port: ${{ env.PORT }}
source: "backend/tennis-tournament-finder-backend"
target: ${{ secrets.DEPLOYMENT_PATH }}
strip_components: 1
Expand All @@ -47,8 +51,8 @@ jobs:
uses: appleboy/ssh-action@master
if: github.event_name != 'pull_request'
with:
host: ${{ secrets.HOST }}
host: ${{ env.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.PORT }}
port: ${{ env.PORT }}
script: supervisorctl restart tennis-tournament-finder-backend

0 comments on commit 34d750d

Please sign in to comment.