Skip to content

Fetch Doodles Data #484

Fetch Doodles Data

Fetch Doodles Data #484

Workflow file for this run

name: Fetch Doodles Data
on:
schedule:
- cron: '0 0 * * *' # Run at 00:00 UTC every day
workflow_dispatch: # Manual trigger
jobs:
fetch_data:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14' # Use Node.js version compatible with your code
- name: Install Dependencies
run: npm install
- name: Run Data Fetch Script
run: node index.js
- name: Set Commit Message
run: |
# Set the commit message with the current date in DD/MM/YYYY format
COMMIT_MESSAGE="Update Doodles Data ($(date +'%d/%m/%Y'))"
echo "$COMMIT_MESSAGE" > commit_message.txt
git config --global user.name "Yasya El Hakim"
git config --global user.email "yasyaelhakim@gmail.com"
git add .
git commit -F commit_message.txt
git push