Skip to content

Get Lastest Youtube Videos #964

Get Lastest Youtube Videos

Get Lastest Youtube Videos #964

name: Get Lastest Youtube Videos
on:
schedule:
- cron: "30 19 * * *" # every day at 7:30pm GMT+2
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
- name: Install dependencies
run: npm install
- name: Run script to generate video list data
run: npm run generate:videos
env:
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
- name: Commit changes
run: |
git config user.name ${{ secrets.GIT_USER_NAME }}
git config user.email ${{ secrets.GIT_USER_EMAIL }}
git add apps/web/data/latestVideos.json
git add apps/devprofile/data/latestVideos.json
git diff --quiet && git diff --staged --quiet || git commit -m "[:robot: BOT] Update latestVideos.json"
git push origin main