-
-
Notifications
You must be signed in to change notification settings - Fork 9
50 lines (43 loc) · 1.61 KB
/
social-count-update.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
name: Social Count Update
on:
workflow_dispatch:
schedule:
- cron: '42 21 * * *'
jobs:
update-social-counts:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
working-directory: scripts/social-count-update
run: npm install
- name: Run script
working-directory: scripts/social-count-update
run: node index.js
env:
REDDIT_CLIENT_ID: ${{ secrets.REDDIT_CLIENT_ID }}
REDDIT_CLIENT_SECRET: ${{ secrets.REDDIT_CLIENT_SECRET }}
REDDIT_USERNAME: ${{ secrets.REDDIT_USERNAME }}
REDDIT_PASSWORD: ${{ secrets.REDDIT_PASSWORD }}
TWITTER_APP_KEY: ${{ secrets.TWITTER_APP_KEY }}
TWITTER_APP_SECRET: ${{ secrets.TWITTER_APP_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_SECRET: ${{ secrets.TWITTER_ACCESS_SECRET }}
VK_ACCESS_TOKEN: ${{ secrets.VK_ACCESS_TOKEN }}
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
FACEBOOK_APP_TOKEN: ${{ secrets.FACEBOOK_APP_TOKEN }}
- name: Commit and push changes
run: |
git config user.name 'Voxel Tycoon'
git config user.email '[email protected]'
git add -A
git commit -m "Update social counts" || echo "No changes to commit"
git push