-
Notifications
You must be signed in to change notification settings - Fork 1.6k
33 lines (27 loc) · 927 Bytes
/
restructure_files.yml
File metadata and controls
33 lines (27 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Restructure files
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
test-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- name: Install Prettier
run: npm install --save-dev --save-exact prettier
- name: Restructure files
run: node_modules/.bin/prettier --write README.md animation-simulation/
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git diff-index --quiet HEAD -- || git commit -am "代码重构 【Github Actions】"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}