小橡树指北, https://blog.growingoak.top/, , 读书笔记;Affiliate Marketing;Googl… #1554
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update readme and feed.opml | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'blogs-original.csv' | |
- 'formatter.py' | |
- 'opml_generator.py' | |
- 'script.js' | |
- '.github/workflows/updateInfo.yml' | |
schedule: | |
- cron: '0 0 * * MON' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 16.x | |
- name: Set up Python 3.7 | |
uses: actions/[email protected] | |
with: | |
python-version: 3.7 | |
- name: formatter | |
run: | | |
python formatter.py | |
- name: update readme | |
run: | | |
npm install | |
node script.js | |
- name: Generate feed.opml | |
run: | | |
python opml_generator.py | |
- name: Commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "update README and feed.opml after adding blog(s)" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |