Skip to content

Merge pull request #63 from PythonBulawayo/develop #17

Merge pull request #63 from PythonBulawayo/develop

Merge pull request #63 from PythonBulawayo/develop #17

Workflow file for this run

name: Deploy Application
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup SSH Keys
run: |
mkdir -p ~/.ssh
echo "${{ secrets.VPS_SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa ${{ secrets.VPS_IP }} >> ~/.ssh/known_hosts
- name: Deploy using Ansible
run: ansible-playbook -i ansible/hosts --private-key ~/.ssh/id_rsa -u optimus ansible/deploy.yaml