Skip to content

refresh news brief #3202

refresh news brief

refresh news brief #3202

Workflow file for this run

name: refresh news brief
on:
schedule:
- cron: '0 */4 * * *'
workflow_dispatch:
jobs:
update-workflow:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Install dependencies
run: |
cd flash-briefing
npm install
- name: Update brief
run: |
cd flash-briefing
node brief-parser.js > ../dist/baked-news.json
- name: Update json
run: |
git config --global user.name 'Kent Brockman'
git config --global user.email '[email protected]'
git add flash-briefing/package-lock.json dist/*
git diff-index --quiet HEAD || git commit -m "chore: updating news"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}