forked from doka-guide/content
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 1.04 KB
/
featured-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
name: Featured Articles
on:
schedule:
- cron: '0 5 * * 5'
jobs:
featured-articles:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.DOKA_BOT_ACCESS_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Обработка featured-статей
run: |
npm install --global gray-matter
npm link gray-matter
node .github/scripts/featured-articles.js
- name: Создание коммита с обновлениями полей featured-файла
run: |
if [[ -z $(git status -s) ]]
then
echo $(git status)
else
git config user.name "Doka Dog"
git config user.email "<[email protected]>"
git add "./settings/featured.md"
git commit -m "Обновляет featured-статьи" --author "Doka Dog <[email protected]>"
git pull --rebase
git push origin main
exit
fi