47 lines (36 loc) · 1.11 KB
/
twitter_stats.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
name: Twitter Stats
on:
workflow_dispatch
jobs:
twitterStats:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@master
with:
node_version: 14
- name: Clone Github Readme Stats repo
uses: actions/checkout@v2
with:
repository: abh80/github-readme-stats
path: temp/
- name: Install modules
run: cd temp && npm install
- name: Run main script
run: node ./temp/src/twitter/index.js
env:
twitter_username: ${{ secrets.TWITTER_USERNAME }}
token: ${{ secrets.TWITTER_TOKEN }}
- name: Remove Temp dir
run: rm -rf temp
- name: Update and Commit
run: |
git config --local user.name "Github Actions"
git config --local user.email "action@github.com"
git add -A
git commit -m "Update Twitter Stats" --allow-empty
- name: Push to Github
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true