Skip to content

Commit

Permalink
add ssh alias env var
Browse files Browse the repository at this point in the history
  • Loading branch information
nemanjam committed Jun 7, 2024
1 parent 6304e4d commit 10b4e60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/bash__deploy-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
workflow_dispatch:

env:
SSH_ALIAS: arm1
IMAGE_NAME_WITH_TAG: ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:latest

jobs:
Expand Down Expand Up @@ -36,7 +37,7 @@ jobs:
chmod 600 ~/.ssh/id_ed25519
# Set up SSH config
echo "Host arm1" > ~/.ssh/config
echo "Host $SSH_ALIAS" > ~/.ssh/config
echo " HostName ${{ secrets.REMOTE_HOST }}" >> ~/.ssh/config
echo " User ${{ secrets.REMOTE_USERNAME }}" >> ~/.ssh/config
echo " IdentityFile ~/.ssh/id_ed25519" >> ~/.ssh/config
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/bash__deploy-nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

env:
SITE_URL: 'https://nemanjamitic.com'
SSH_ALIAS: arm1

jobs:
deploy:
Expand Down Expand Up @@ -49,7 +50,7 @@ jobs:
chmod 600 ~/.ssh/id_ed25519
# Set up SSH config
echo "Host arm1" > ~/.ssh/config
echo "Host $SSH_ALIAS" > ~/.ssh/config
echo " HostName ${{ secrets.REMOTE_HOST }}" >> ~/.ssh/config
echo " User ${{ secrets.REMOTE_USERNAME }}" >> ~/.ssh/config
echo " IdentityFile ~/.ssh/id_ed25519" >> ~/.ssh/config
Expand Down

0 comments on commit 10b4e60

Please sign in to comment.