.github/workflows/update.yml #2998
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
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '8 18 * * *' | |
- cron: '8 19 * * *' | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
path: gh-pages | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- run: ./bin/playlist-json gh-pages/playlists.json | |
env: | |
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }} | |
- run: | | |
if git diff --quiet; then | |
exit 0 | |
fi | |
git -c user.name='Anthony Sottile' -c user.email=asottile@umich.edu commit -a -m 'update playlist' | |
git push origin HEAD | |
working-directory: gh-pages | |
- run: ./bin/update-playlist gh-pages/playlists.json README.md | |
- run: | | |
if git diff --quiet; then | |
exit 0 | |
fi | |
git -c user.name='Anthony Sottile' -c user.email=asottile@umich.edu commit -a -m 'update playlist' | |
git push origin HEAD |