-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (32 loc) · 1 KB
/
update_posts.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
name: Update Jadi Blog Posts
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update_posts:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Update from repository
run: |
git config --global user.name "Max Base (Actions)"
git config --global user.email "maxbasecode+githubactions@gmail.com"
git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/BaseMax/jadi-net-blog.git
git pull origin main
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Run the Python script to fetch posts
run: |
python extract_posts.py
- name: Commit and push changes
run: |
git add .
git commit -m "Automated commit"
git push origin main