workflow configure #3
This file contains 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 Spoty Bot | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Install FFmpeg | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ffmpeg | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install -U --force-reinstall https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz | |
- name: Create config.json from secrets | |
run: | | |
echo '{ | |
"TOKEN": "${{ secrets.DISCORD_BOT_TOKEN }}", | |
"PREFIX": "${{ secrets.BOT_PREFIX }}", | |
"ADMINID": "${{ secrets.DISCORD_ADMIN_ID }}" | |
}' > config.json | |
- name: Run Spoty Bot | |
run: | | |
python main.py |