forked from roualdes/latexcheatsheet
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 877 Bytes
/
main.yaml
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
34
35
36
name: prettify latexcheatsheet
on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install prettier
- run: npx prettier --write index.html
- name: Check for changes
id: check_diff
run: |
git diff --quiet . || echo "changes=true" >> $GITHUB_OUTPUT
- name: Setup git identity and commit changes
if: steps.check_diff.outputs.changed == 'true'
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add index.html
git commit -m "prettify index.html"
git push