🌟 Github Action과 시스템 올 그린! 발진 준비완료!
This commit is contained in:
parent
2ba9b8ee32
commit
3a888af951
5 changed files with 53 additions and 7 deletions
13
app/run.sh
13
app/run.sh
|
|
@ -1,3 +1,10 @@
|
|||
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
|
||||
echo "Debug: Script started at $(date)" >> /code/app/temp/debug.log
|
||||
echo "Debug: Current directory is $(pwd)" >> /code/app/temp/debug.log
|
||||
echo "Debug: User is $(whoami)" >> /code/app/temp/debug.log
|
||||
echo "Debug: Environment variables:" >> /code/app/temp/debug.log
|
||||
env >> /code/app/temp/debug.log
|
||||
|
||||
cd /code/app
|
||||
|
||||
# If doesn't have temp folder, create it
|
||||
|
|
@ -7,7 +14,7 @@ fi
|
|||
|
||||
# If doesn't have temp/cookies.json, create it
|
||||
if [ ! -f "temp/cookies.json" ]; then
|
||||
python3 library/init-auth.py
|
||||
/code/app/venv/bin/python3 library/init-auth.py
|
||||
fi
|
||||
|
||||
# Set the log file name with the current date and time
|
||||
|
|
@ -15,7 +22,7 @@ log_file="temp/$(date +%Y%m%d-%H%M%S).log"
|
|||
|
||||
# Run the Python script with or without --today and output to both the console and log file
|
||||
if [[ "$1" == "--today" ]]; then
|
||||
python3 run.py --today | tee "$log_file"
|
||||
/code/app/venv/bin/python3 run.py --today | tee "$log_file"
|
||||
else
|
||||
python3 run.py | tee "$log_file"
|
||||
/code/app/venv/bin/python3 run.py | tee "$log_file"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue