.profile/.github/workflows/rss.yml

39 lines
1.3 KiB
YAML

name: Update RSS feeds on README section
on:
push:
workflow_dispatch: # allow users to randomly trigger workflows for debugging
schedule:
- cron: '0 * * * *' # workflow run per 24 hours
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Check out the latest commit of the repository history
uses: actions/checkout@v2
- name: Set up node environment
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install node dependencies for running build
run: |
yarn install
yarn lint
- name: Generate RSS feeds from source into Markdown formatting
run: |
yarn generate
- name: Commit changed README file
run: |
git diff
git config --global user.email "hello@toshiki.dev"
git config --global user.name "@andatoshiki"
git remote set-url --push origin https://andatoshiki:${{ secrets.GH_PAT }}@github.com/andatoshiki/andatoshiki
git add .
git commit -m 'chore(update): update readme with the latest rss feeds'
git push -f origin master
# - name: Push changes to repository
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: ${{ github.ref }}