From 8cd061d05ca08762fbed6c2d31b0ed6b05567110 Mon Sep 17 00:00:00 2001 From: bartekl1 <123882445+bartekl1@users.noreply.github.com> Date: Mon, 25 Mar 2024 18:00:47 +0100 Subject: [PATCH] Install PIP requirements before webapp reload --- .github/workflows/pythonanywhere.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pythonanywhere.yml b/.github/workflows/pythonanywhere.yml index 22bfcde..d910017 100644 --- a/.github/workflows/pythonanywhere.yml +++ b/.github/workflows/pythonanywhere.yml @@ -21,6 +21,10 @@ jobs: run: | curl -X "POST" -H "Authorization: Token ${{ secrets.PYTHONANYWHERE_TOKEN }}" -d '{"input": "git pull\n"}' -H "Content-Type: application/json" "https://${{ secrets.PYTHONANYWHERE_HOST }}/api/v0/user/${{ secrets.PYTHONANYWHERE_USERNAME }}/consoles/${{ secrets.PYTHONANYWHERE_CONSOLE }}/send_input/" + - name: Install PIP requirements + run: | + curl -X "POST" -H "Authorization: Token ${{ secrets.PYTHONANYWHERE_TOKEN }}" -d '{"input": "pip${{ secrets.PYTHON_VERSION }} install -r requirements.txt\n"}' -H "Content-Type: application/json" "https://${{ secrets.PYTHONANYWHERE_HOST }}/api/v0/user/${{ secrets.PYTHONANYWHERE_USERNAME }}/consoles/${{ secrets.PYTHONANYWHERE_CONSOLE }}/send_input/" + - name: Reaload webapp run: | curl -X "POST" -H "Authorization: Token ${{ secrets.PYTHONANYWHERE_TOKEN }}" "https://${{ secrets.PYTHONANYWHERE_HOST }}/api/v0/user/${{ secrets.PYTHONANYWHERE_USERNAME }}/webapps/${{ secrets.PYTHONANYWHERE_DOMAIN }}/reload/"