Hey, I'm trying to use Github Actions to deploy my code on PythonAnywhere. The script is a simple Python script (main.py), already pre-uploaded to PythonAnywhere in advance, that should be run by Github Actions. The script "main.py" will pull new code changes in the repo from Github Actions, and then run the "app.py".
For some reason, this code just doesn't run the file:
- name: Deploy to PythonAnywhere
env:
PYTHON_ANYWHERE_API_TOKEN: ${{ secrets.PYTHON_ANYWHERE_API_TOKEN }}
run: |
response=$(curl -s -o /dev/null -w "%{http_code}" -X POST \
"https://www.pythonanywhere.com/api/v0/user/<username>/consoles/" \
-H "Authorization: Token $PYTHON_ANYWHERE_API_TOKEN" \
--data "executable=python3.10" \
--data "command=python3.10 /home/<username>/main.py > /home/<username>/main_log_2.txt 2>&1")
I'm failing to troubleshoot this issue. Please assume that <username>=my_username
Thanks for guidance