sync blog #651
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 Blog | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
update_blog: | |
runs-on: ubuntu-latest | |
if: github.repository == 'emqx/blog' && github.head_commit.author.email != '[email protected]' | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Update blogs | |
env: | |
UPDATE_API: ${{ secrets.UPDATE_API }} | |
UPDATE_TOKEN: ${{ secrets.UPDATE_TOKEN }} | |
run: | | |
if git diff HEAD^ HEAD --name-only | grep -e "md$"; then | |
changed_files=$(git diff HEAD^ HEAD --name-only | grep -e "md$") | |
python3 .ci/update_blog.py $(pwd) $changed_files | |
fi |