Skip to content

CI: auto-update docs-tools on push, merge images into update job #4

CI: auto-update docs-tools on push, merge images into update job

CI: auto-update docs-tools on push, merge images into update job #4

Workflow file for this run

name: docs
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install
- run: bun lint
update:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install
- run: bun update docs-tools
- run: bun images:optimize
- run: bun og:generate
- name: Commit changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add bun.lock assets/ docs/ 2>/dev/null || true
git diff --cached --quiet || git commit -m "chore: update docs-tools + optimize assets"
git push