Skip to content

Social Count Update #367

Social Count Update

Social Count Update #367

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