-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 1.19 KB
/
social-media-followers.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
name: Social Media Followers Update
on: push
jobs:
update-followers:
runs-on: ubuntu-latest
permissions:
contents: write
env: # Secrets stored at https://github.com/elara-aerospace/elara-aerospace.github.io/settings/secrets/actions
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
YOUTUBE_CHANNEL_ID: ${{ secrets.YOUTUBE_CHANNEL_ID }}
TWITTER_BEARER_TOKEN: ${{ secrets.TWITTER_BEARER_TOKEN }}
TWITTER_USERNAME: ${{ secrets.TWITTER_USERNAME }}
GITHUB_USERNAME: ${{ secrets.GH_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run social media scripts
run: |
python scripts/social-media/twitter.py
python scripts/social-media/youtube.py
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update social media follower counts"
file_pattern: '_data/social-media.yml'