Skip to content

Commit

Permalink
add ssh config action again
Browse files Browse the repository at this point in the history
  • Loading branch information
nemanjam committed Jun 7, 2024
1 parent bef152e commit 99d5fb6
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions .github/workflows/bash__deploy-nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,18 @@ jobs:
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build nemanjamiticcom
- name: Build app
run: yarn build

- name: Set up SSH config
run: |
# Set up SSH key
mkdir -p ~/.ssh
echo "${{ secrets.REMOTE_KEY_ED25519 }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
# Set up SSH config
echo "Host arm1" > ~/.ssh/config
echo " HostName ${{ secrets.REMOTE_HOST }}" >> ~/.ssh/config
echo " User ${{ secrets.REMOTE_USERNAME }}" >> ~/.ssh/config
echo " IdentityFile ~/.ssh/id_ed25519" >> ~/.ssh/config
echo " Port ${{ secrets.REMOTE_PORT }}" >> ~/.ssh/config
chmod 600 ~/.ssh/config
# Add SSH server key to known_hosts
ssh-keyscan -H ${{ secrets.REMOTE_HOST }} >> ~/.ssh/known_hosts
id: ssh-foo
uses: invi5H/ssh-action@v1
with:
NAME: arm1
SSH_HOST: ${{ secrets.REMOTE_HOST }}
SSH_USER: ${{ secrets.REMOTE_USERNAME }}
SSH_KEY: ${{ secrets.REMOTE_KEY_ED25519 }}
SSH_PORT: ${{ secrets.REMOTE_PORT }}

- name: Run bash file with yarn
run: yarn deploy:nginx

0 comments on commit 99d5fb6

Please sign in to comment.