🌟update: 修改CNAME文件 #55
This file contains hidden or 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: Run Prettier on Commit | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: npm ci || npm install | |
- name: Run Prettier | |
run: npx prettier --write "**/*.js" | |
- name: Add Diff | |
run: git add leetcodeRating_greasyfork.user.js | |
- name: Commit files | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git commit -m "chore: format with Prettier" || echo "No changes to commit" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{secrets.TOKEN}} | |
branch: main |