Bump actions/checkout from 3 to 4 #13
Workflow file for this run
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: prettify latexcheatsheet | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
workflow_dispatch: {} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 |