Deploy to server #68
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 EuroPythonBot with ansible | |
run: ansible-playbook -i ansible/inventory.ini ansible/deploy-playbook.yml --private-key="/home/runner/.ssh/id_rsa" --user=root | |
env: | |
ANSIBLE_HOST_KEY_CHECKING: "false" |