-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (81 loc) · 2.86 KB
/
headlines-pt.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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