Load new videos #14188
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: Load new videos | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '10 * * * *' | |
env: | |
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }} | |
jobs: | |
load-new-videos: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
cache-dependency-path: package-lock.json | |
- run: npm ci | |
- run: tsc --build | |
- run: npm run loadNewVideos | |
- run: git config user.name github-actions | |
- run: git config user.email [email protected] | |
- run: git add . | |
- run: git commit -m "LNV `date +'%Y-%m-%d %H:%M:%S'`" || echo "No changes to commit" | |
- run: git push || echo "Nothing to push" |