catppuccin/.github/workflows
2024-03-24 21:13:06 +00:00
..
readme.yml ci(readme): upgrade to actions/checkout@v4 2024-02-15 02:44:34 +00:00
website.yml ci: add deploy hook for website (#2322) 2024-03-24 21:13:06 +00:00

name: Generate READMEs

on:
  workflow_dispatch:
  push:
    branches: ["main"]
    paths: ["resources/**"]
  pull_request:
    paths: ["resources/**"]

jobs:
  readme:
    runs-on: ubuntu-latest
    name: Re-generate README sections

    steps:
      - uses: actions/checkout@v4

      - name: Setup Deno
        uses: nekowinston/setup-deno@v1
        with:
          deno-json-path: resources/deno.json
          deno-lock-path: resources/deno.lock
          directory: resources

      - name: Update READMEs
        working-directory: resources/generate
        run: ./main.ts

      - name: Push changes
        uses: stefanzweifel/git-auto-commit-action@v4
        # only push once upstreamed
        if: ${{ github.repository == 'catppuccin/catppuccin' && github.ref == 'refs/heads/main' }}
        with:
          commit_message: "chore: re-generate README sections"
          commit_author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
          branch: ${{ github.head_ref }}

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json