forked from EuroPython/discord
-
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (27 loc) · 777 Bytes
/
deploy.yml
File metadata and controls
34 lines (27 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Deploy to server
permissions:
contents: read
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-python@v6
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 --user=root
env:
ANSIBLE_HOST_KEY_CHECKING: "false"