Update docs.yml #5
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: Docs | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure Git Credentials | |
| run: | | |
| git config user.name 'github-actions[bot]' | |
| git config user.email 'github-actions[bot]@users.noreply.github.com' | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.x | |
| - name: Set cache ID | |
| run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| key: mkdocs-shadcn-${{ env.cache_id }} | |
| path: ~/.cache | |
| restore-keys: | | |
| mkdocs-shadcn- | |
| - name: Install dependencies | |
| run: pip install mkdocs-shadcn pymdown-extensions | |
| - name: Deploy documentation | |
| run: mkdocs gh-deploy --force |