mirror of
https://github.com/PucelaBits/websegura.git
synced 2024-07-04 12:05:45 +02:00
feat: add new twitter workflow (#185)
This commit is contained in:
parent
303e2a08ed
commit
050c6b244b
28
.github/workflows/twitter.yml
vendored
Normal file
28
.github/workflows/twitter.yml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
name: analyze
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 4 * * *"
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "14"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Request Twitter stats
|
||||
env:
|
||||
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
|
||||
TWITTER_API_SECRET: ${{ secrets.TWITTER_API_SECRET }}
|
||||
run: npm run twitter:search
|
3
crawler/twitter.js
Normal file
3
crawler/twitter.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
// TODO
|
||||
|
||||
console.log(process.env.TWITTER_API_KEY);
|
|
@ -11,6 +11,7 @@
|
|||
"crawl:analyze": "node crawler/analyze.js",
|
||||
"crawl:results": "node crawler/results.js",
|
||||
"crawl": "npm run crawl:analyze && sleep 60 && npm run crawl:results",
|
||||
"twitter:search": "node crawler/twitter.js",
|
||||
"test": "ava"
|
||||
},
|
||||
"repository": {
|
||||
|
|
Loading…
Reference in New Issue
Block a user