Skip to content

Deploy to server

Deploy to server #70

Workflow file for this run

name: Deploy to server
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.11.12'
- name: Install Ansible
run: |
sudo apt update
sudo apt install -y ansible
- name: Set up SSH agent
uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: ${{ secrets.DISCORD_BOT_DEPLOY_KEY }}
- name: Deploy Discord Bot with ansible
run: ansible-playbook -i ${{ secrets.DISCORD_BOT_SERVER_HOST }}, ansible/deploy-playbook.yml --private-key="/home/runner/.ssh/id_rsa" --user=root
env:
ANSIBLE_HOST_KEY_CHECKING: "false"