Skip to content

Commit

Permalink
Create azure-deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilonauzd committed Dec 12, 2024
1 parent 3d20896 commit 9d55ca2
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/azure-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy to Azure

on:
push:
branches:
- main # Adjust to your main branch

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.AZURE_PRIVATE_KEY }}" > ~/.ssh/id_rsa
echo "${{ secrets.AZURE_PUBLIC_KEY }}" > ~/.ssh/id_rsa.pub
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H your_server_ip >> ~/.ssh/known_hosts
- name: Deploy to Azure
run: |
ssh svc_mwc@your_server_ip << 'EOF'
cd /path/to/your/project
git pull origin main
./restart_script.sh
EOF

0 comments on commit 9d55ca2

Please sign in to comment.