fix awesome-lint issues #7
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: Update Docs Branch + i18n + Site | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'README.md' | |
| - 'docs/**' | |
| - 'scripts/sync-docs.mjs' | |
| - 'scripts/translate-docs.mjs' | |
| - 'src/content/i18n/**' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: update-docs-i18n-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| sync-docs-branch-readme: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout main branch | |
| uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| - name: Sync README.md to docs branch | |
| run: | | |
| git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| if git ls-remote --exit-code --heads origin docs >/dev/null 2>&1; then | |
| git fetch origin docs | |
| git checkout -B docs origin/docs | |
| else | |
| echo "docs branch not found, creating it from main" | |
| git checkout -B docs origin/main | |
| fi | |
| git checkout origin/main -- README.md | |
| git add README.md | |
| if git diff --staged --quiet; then | |
| echo "No README.md changes for docs branch" | |
| else | |
| git commit -m "chore(docs-branch): sync README from main" | |
| git push origin docs | |
| fi | |
| update-docs: | |
| needs: sync-docs-branch-readme | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout docs branch | |
| uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| ref: docs | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.14.1 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Generate translated docs | |
| run: bun run translate:docs | |
| - name: Sync docs for Astro content layer | |
| run: bun run sync:docs | |
| - name: Commit and push updates | |
| run: | | |
| git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add -f docs-*/ scripts/translation-cache.json src/content/docs/ | |
| if git diff --staged --quiet; then | |
| echo "No docs/i18n changes to commit" | |
| else | |
| git commit -m "chore(docs): auto-update translations and Astro docs content" | |
| git push origin docs | |
| fi |