news_job.sh 385 B

123456789101112131415
  1. #!/bin/bash
  2. # 設定 Python 路徑(如果你有使用 venv 或 pyenv 請改成對應路徑)
  3. # PYTHON=/usr/bin/python3
  4. PYTHON=/root/anaconda3/bin/python
  5. # 執行 government_news.py
  6. cd /home/zooey/
  7. $PYTHON government_news.py
  8. # Git commit & push
  9. cd /home/zooey/news_aimedium_org/
  10. git pull
  11. git add .
  12. git commit -m "每日更新"
  13. git push origin master # 或你實際使用的分支