Run Python Script #75
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Python Script | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Th is cro n expression runs the job at midnight UTC every day | |
push: | |
branches: | |
- Original # Run on push to the main branch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' # Specify the Python version | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt # Ensure you have a requirements.txt file in your repo | |
- name: Run script | |
env: | |
YOUTUBE: ${{ secrets.YOUTUBE }} | |
CHANNEL_ID: ${{ secrets.CHANNEL_ID }} | |
GEMINI: ${{ secrets.GEMINI }} | |
MEDIUM: ${{ secrets.MEDIUM }} | |
run: | | |
python blogautomated.py # Replace with the path to your Python script |