set up docs site with mkdocs/mike #2
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: auto-format | |
on: | |
workflow_dispatch: | |
pull_request: | |
env: | |
GH_TOKEN: ${{ github.token }} | |
jobs: | |
auto-format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
if: github.event_name == 'pull_request' | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.ref }} | |
- uses: actions/checkout@v4 | |
if: github.event_name == 'push' | |
with: | |
fetch-depth: 0 | |
- name: format | |
uses: pre-commit/[email protected] | |
continue-on-error: true | |
- name: commit & push | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m "ci: 🤖 format everything with pre-commit" && git push || echo "nothing to commit" |