-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (34 loc) · 1015 Bytes
/
pull-articles.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: Pull Articles
on:
schedule:
- cron: "*/30 * * * *"
workflow_dispatch:
jobs:
pull:
name: Pull
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Pull the latest articles
env:
DLL_API: ${{ secrets.DLL_API }}
run: python mc_contents.py api
- name: Commit the changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "SPGlove"
git add .
git diff-index --quiet HEAD || git commit -m ":arrows_counterclockwise: pull articles"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}