Skip to content

Headlines PT

Headlines PT #18688

Workflow file for this run

name: Headlines PT
on:
workflow_dispatch:
schedule:
- cron: '*/15 6-23 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Check out repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build
run: npx puppeteer browsers install chrome
- name: Scrape ECO
run: node ecoHeadline.js
continue-on-error: true
- name: Scrape Público
run: node publicoHeadline.js
continue-on-error: true
- name: Scrape Observador
run: node obsHeadline.js
continue-on-error: true
- name: Scrape CNN Portugal
run: node cnnHeadline.js
continue-on-error: true
- name: Scrape Correio da Manhã
run: node cmHeadline.js
continue-on-error: true
- name: Scrape Economico
run: node economicoHeadline.js
continue-on-error: true
- name: Scrape RTP Notícias
run: node rtpHeadline.js
continue-on-error: true
- name: Scrape Novo
run: node novoHeadline.js
continue-on-error: true
- name: Scrape Renascença
run: node renascencaHeadline.js
continue-on-error: true
- name: Scrape Jornal i
run: node jornaliHeadline.js
continue-on-error: true
- name: Scrape Notícias ao Minuto
run: node noticiasaominutoHeadline.js
continue-on-error: true
- name: Scrape Expresso
run: node expressoHeadline.js
continue-on-error: true
- name: Scrape SIC Notícias
run: node sicHeadline.js
continue-on-error: true
- name: Scrape DN
run: node dnHeadline.js
continue-on-error: true
- name: Scrape JN
run: node jnHeadline.js
continue-on-error: true
- name: Scrape Dinheiro Vivo
run: node dinheirovivoHeadline.js
continue-on-error: true
- name: Scrape TSF
run: node tsfHeadline.js
continue-on-error: true
- name: Scrape Negócios
run: node negociosHeadline.js
continue-on-error: true
- name: Merge files
run: |-
jq -s . headlines/headline--cnn.json headlines/headline--cm.json headlines/headline--dinheirovivo.json headlines/headline--dn.json headlines/headline--eco.json headlines/headline--economico.json headlines/headline--expresso.json headlines/headline--jn.json headlines/headline--jornali.json headlines/headline--negocios.json headlines/headline--noticiasaominuto.json headlines/headline--observador.json headlines/headline--publico.json headlines/headline--renascenca.json headlines/headline--rtp.json headlines/headline--sicnoticias.json headlines/headline--tsf.json | jq -r tostring > headlines/headlinespt.json
- name: Commit and push changes
run: |-
git diff
git config user.name "Automated"
git config user.email "---"
git pull
git diff --quiet || (git add -A && git commit -m "Updated Headlines PT")
git push