Get Lastest Youtube Videos #977
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: 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 |