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