bureau does not participate #98
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: Reload bot | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
PYTHON: python3.11 | |
PIP: pip3.11 | |
jobs: | |
reload: | |
runs-on: [self-hosted, linux] | |
steps: | |
- name: Go to the bot directory | |
run : cd ~/Dijkstra-Chan | |
- name: Pull and checkout branch | |
run: | | |
cd ~/Dijkstra-Chan | |
git pull origin ${{ github.ref_name }} | |
git checkout ${{ github.ref_name }} | |
- name: Set up Python environnement | |
run: | | |
cd ~/Dijkstra-Chan | |
source env/bin/activate | |
$PYTHON -m pip install --upgrade pip | |
$PIP install -r requirements.txt | |
- name: Shutdown bot | |
continue-on-error: true | |
run: killall $PYTHON | |
- name: Run bot | |
env: | |
RUNNER_TRACKING_ID: "" | |
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
cd ~/Dijkstra-Chan | |
source env/bin/activate | |
$PYTHON main.py & |