Sync Post #48
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: Sync Post | |
# Controls when the workflow will run | |
on: | |
# schedule: | |
# - cron: "30 1 * * *" | |
# https://docs.github.com/cn/developers/webhooks-and-events/events/issue-event-types | |
issues: | |
types: | |
- opened | |
- closed | |
- renamed | |
- labeled | |
- unlabeled | |
- reopened | |
- committed # 修改? | |
workflow_dispatch: | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
GH_USER: ${{ secrets.GH_USER }} | |
GH_PROJECT_NAME: ${{ secrets.GH_PROJECT_NAME }} | |
jobs: | |
Publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v2 | |
- name: Git config 🔧 | |
run: | | |
git config --global user.name "giscafer" | |
git config --global user.email "[email protected]" | |
- name: Display runtime info ✨ | |
run: | | |
echo '当前目录:' | |
pwd | |
- name: Install 🔧 | |
run: yarn install | |
# - name: Build ⛏️ | |
# run: yarn build | |
- name: Update blog files ⛏️ | |
run: | | |
yarn sync-post | |
git add . | |
git commit -m 'chore(ci): blog sync' | |
git push |