Skip to content

Commit

Permalink
Write SSH key to file
Browse files Browse the repository at this point in the history
  • Loading branch information
nickclyde committed Sep 4, 2024
1 parent 27bf5b6 commit b702d21
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,13 @@ jobs:
AZURE_VM_IP: ${{ secrets.AZURE_VM_IP }}
AZURE_VM_SSH_KEY: ${{ secrets.AZURE_VM_SSH_KEY }}
run: |
install -m 600 -D /dev/null ~/.ssh/phinvads-go
echo "${{ secrets.AZURE_VM_SSH_KEY }}" > ~/.ssh/phinvads-go
ssh-keyscan -H $AZURE_VM_IP > ~/.ssh/known_hosts
go install github.com/a-h/templ/cmd/templ@latest
templ generate
go build -o phinvads-go ./cmd/phinvads-go
scp -i <(echo "$AZURE_VM_SSH_KEY") ./phinvads-go azureuser@${AZURE_VM_IP}:/home/azureuser/phinvads-go
scp -i ~/.ssh/phinvads-go ./phinvads-go azureuser@${AZURE_VM_IP}:/home/azureuser/phinvads-go
- name: Disallow GitHub Runner IP
run: |
Expand Down

0 comments on commit b702d21

Please sign in to comment.