Skip to content

Add deploy actions

Add deploy actions #1

Workflow file for this run

name: Deploy to VM
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
- name: Deploy project to VM
run: |
rsync -avz --delete ./src/ [email protected]:/var/www/html/
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}