Skip to content

Featured Articles

Featured Articles #110

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