diff options
| author | Bobby <[email protected]> | 2023-05-15 09:02:54 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2023-05-15 09:02:54 -0400 |
| commit | 77cd53091f0cf99de105098c0664a2efc13f4e44 (patch) | |
| tree | 900b4eaaa60608d7937db11f160a90dbb45637b5 /.github/workflows | |
| parent | 9e12263dfc0f51add032cec088eacde815897e4e (diff) | |
| download | thatcomputerscientist-77cd53091f0cf99de105098c0664a2efc13f4e44.tar.xz thatcomputerscientist-77cd53091f0cf99de105098c0664a2efc13f4e44.zip | |
Update workflow with deployment commands
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/main.yml | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b9e73c52..fa73ab00 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,4 +13,25 @@ jobs: username: ${{ secrets.USERNAME }} key: ${{ secrets.KEY_ED25519 }} port: ${{ secrets.PORT }} - script: sh /home/ubuntu/deploy.sh
\ No newline at end of file + script: | + cd /home/ubuntu/thatcomputerscientist/ + git pull origin main --recurse-submodules + rm -rf .env + cp /home/ubuntu/.env . + pip3 install -r requirements.txt + python3 manage.py makemigrations + python3 manage.py migrate + python3 manage.py collectstatic --noinput + kill $(ps aux | grep 'daphne -b 0.0.0.0 -p 8000 thatcomputerscientist.asgi:application' | grep -v grep | awk '{print $2}') + nohup daphne -b 0.0.0.0 -p 8000 thatcomputerscientist.asgi:application > /dev/null 2>&1 & + echo "Deployed Successfully" + echo "Taking Screenshot" + echo "Sleeping..." + sleep 5 + echo Curl Running... + curl -k -L --output siteshot.png http://localhost:8000/ignis/screenshot + rm siteshot.png + echo "Screenshot Saved..." + ls thatcomputerscientist/ + echo "Done" +
\ No newline at end of file |
