Merge pull request #99 from GabrielRF/OAB_41 #155
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 | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy using ssh | |
uses: garygrossgarten/github-action-ssh@release | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USER }} | |
privateKey: ${{ secrets.SSH_PRIVATE_KEY }} | |
command: | | |
cd /usr/local/bin/QuestoesDeConcursoBot/ | |
git pull origin main | |
systemctl restart tg_questoesdeconcurso | |
message: | |
needs: | |
- deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- name: Install Requirements | |
run: pip install -r requirements.txt | |
- name: Run Novidades | |
run: python utils/novidades.py | |
env: | |
commit_message: ${{ github.event.head_commit.message }} | |
BOT_TOKEN: ${{ secrets.BOT_TOKEN }} |