Get Talks #56
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: '0 0 * * 0' | |
name: Get Talks | |
jobs: | |
fetch: | |
name: Get talks | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Get talks | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
cd content/talks && \ | |
sh get_talks.sh | |
- name: Commit and push if changed | |
run: | | |
git diff --quiet || git commit -am "Update talks" && git push | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
- name: Trigger build | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: 'DrMowinckels', | |
repo: 'drmowinckels.github.io', | |
workflow_id: 'build-site.yaml', | |
ref: 'main' | |
}) | |