添加上课说明 #76
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: 自动格式化文档 | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
auto-prettier: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Get File Changes | |
uses: trilom/file-changes-action@v1.2.4 | |
with: | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
output: '" "' | |
- name: Run Prettier | |
run: npx prettier --write "${{ steps.get_file_changes.outputs.files }}" | |
continue-on-error: true | |
- name: Auto Commit | |
uses: stefanzweifel/git-auto-commit-action@v4.3.0 | |
with: | |
commit_message: 自动格式化文档 | |
branch: ${{ github.head_ref }} |