Skip to content

Run Monthly Script

Run Monthly Script #2

Workflow file for this run

name: Run Monthly Script
on:
schedule:
- cron: '0 0 1 * *' # This will run the script on the first day of every month at midnight UTC
workflow_dispatch: # Allows manual triggering of the workflow
push:
paths:
- import_csv.txt
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests beautifulsoup4
- name: Run the script
run: python3 ./scripts/import_csv.py
- name: Configure Git
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
- name: Commit
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git pull origin dev --no-ff --allow-unrelated-histories
git add -A .
git commit --allow-empty -m Update
git push