catppuccin/.github/workflows
2024-02-15 02:43:34 +00:00
..
readme.yml ci(readme): remove github.head_ref 2024-02-15 02:43:34 +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@v3

      - 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