Skip to content

Update main.yml

Update main.yml #15

Workflow file for this run

name: Deploy to ACI
on:
push:
branches: ["main"]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: "Setup SSH key"
run: |
mkdir -p ~/.ssh
echo "${{ secrets.PHINCHAKDOOJA_SSH_PRIVATE_KEY }}" > ~/.ssh/${{ github.sha }}
chmod 600 ~/.ssh/${{ github.sha }}
ssh-keyscan ${{ secrets.VM_IP_ADDRESS }} >> ~/.ssh/known_hosts
- name: "Execute deployment script via SSH"
run: ssh -i ~/.ssh/${{ github.sha }} ${{ secrets.VM_ROOT_USER }}@${{ secrets.VM_IP_ADDRESS}} 'sudo killall node'