feat: init blog data #1
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 latest posts | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
update-latest-posts: | |
name: update latest posts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Setup node | |
uses: actions/setup-node@v2-beta | |
with: | |
node-version: "20" | |
- name: Install node dependencies | |
run: yarn | |
- name: Run node script | |
run: yarn run update-readme | |
- name: Git setup | |
run: git config --global user.email readme-bot@linxiaodong.com && git config --global user.name readme-bot | |
- name: Git commit README.md file | |
run: git diff --quiet && git diff --staged --quiet || git commit -am '[BOT] Update readme' && git push | |
- name: push to profile repo | |
run: | | |
git clone https://github.com/buxuku/buxuku.git | |
cp ./profile.md ./buxuku/README.md | |
cd buxuku | |
git diff --quiet && git diff --staged --quiet || git commit -am '[BOT] Update readme' && git push | |