File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change 1- name : Automate PythonAnywhere Bash Shell
1+ name : Deploy to PythonAnywhere
22
33on :
44 push :
55 branches :
66 - master
77
88jobs :
9- run_pythonanywhere :
9+ deploy :
1010 runs-on : ubuntu-latest
1111
1212 steps :
13- - name : Send Bash Command to PythonAnywhere
14- run : |
15- curl -s -X GET \
16- "https://www.pythonanywhere.com/api/v0/user/${{ secrets.PA_USERNAME }}/webapps/" \
17- -H "Authorization: Token ${{ secrets.PA_API_TOKEN }}" \
18- -H "Content-Type: application/json"
13+ - name : Checkout repository
14+ uses : actions/checkout@v4
15+
16+ - name : Update code on PythonAnywhere
17+ run : |
18+ curl -s -X POST \
19+ "https://www.pythonanywhere.com/api/v0/user/${{ secrets.PA_USERNAME }}/consoles/38366532/send_input/" \
20+ -H "Authorization: Token ${{ secrets.PA_API_TOKEN }}" \
21+ -d '{"input": "cd metro-fare-calculator && git pull origin main\n"}' \
22+ -H "Content-Type: application/json"
23+
1924
You can’t perform that action at this time.
0 commit comments