Skip to content

Commit 1d02f86

Browse files
Initial commit
0 parents  commit 1d02f86

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/main.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Main
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
schedule:
8+
- cron: "0 * * * *"
9+
10+
workflow_dispatch:
11+
12+
permissions:
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: pages
18+
cancel-in-progress: true
19+
20+
jobs:
21+
Main:
22+
environment:
23+
name: github-pages
24+
url: ${{ steps.deployment.outputs.page_url }}
25+
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- run: |
30+
curl https://newsapi.org/v2/top-headlines -G \
31+
-d language=en \
32+
-d pageSize=35 \
33+
-d apiKey=${{ secrets.NEWSAPI_KEY }} \
34+
-o news.json
35+
36+
- uses: actions/upload-pages-artifact@v1
37+
with:
38+
path: .
39+
40+
- id: deployment
41+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)