Skip to content

Commit

Permalink
Revert and use secrets correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanKerr1225 committed Dec 1, 2024
1 parent e8276c1 commit 49a5a02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/update_website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:

- name: Update site
shell: bash
env:
CSRF_TOKEN: {{ secrets.ION_CSRF_TOKEN }}
SESSION_ID: {{ secrets.ION_SESSION_ID }}
run: |
python3 update.py
pip3 install websocket-client && \
python3 update.py ${{ secrets.ION_CSRF_TOKEN }} ${{ secrets.ION_SESSION_ID }}
4 changes: 2 additions & 2 deletions update.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from websocket import WebSocket
import os
import sys

conn = WebSocket()
conn.connect("wss://director.tjhsst.edu/sites/399/terminal/?", cookie=f"csrftoken={os.environ["CSRF_TOKEN"]};sessionid={os.environ["SESSION_ID"]}")
conn.connect("wss://director.tjhsst.edu/sites/399/terminal/?", cookie=f"csrftoken={sys.argv[1]};sessionid={sys.argv[2]}")
if 'true' not in conn.recv():
print("Could not connect")
exit(1)
Expand Down

0 comments on commit 49a5a02

Please sign in to comment.