> For the complete documentation index, see [llms.txt](https://wiki.owain.codes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.owain.codes/git/git-actions/create-a-readme-file-automatically.md).

# Create a readme file automatically

This job runs on the 0th, 6th, 12th, 18th hour of the day e.g. midnight, 6am, midday 6pm.\
To run it on the hour, every hour, just change the value to `/1`

```
name: Update README

on:
  push:
  schedule:
    - cron: "0 */6 * * *"

jobs:
  markscribe:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master

      - uses: muesli/readme-scribe@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITBOOK_TOKEN }}
        with:
          template: "templates/README.md.tpl"
          writeTo: "README.md"

      - uses: actions/upload-artifact@v1
        with:
          name: README.md
          path: README.md

      - uses: stefanzweifel/git-auto-commit-action@v4
        env:
          GITHUB_TOKEN: ${{ secrets.GITBOOK_TOKEN }}
        with:
          commit_message: Update generated README
          branch: master
          commit_user_name: readme-scribe 🤖
          commit_user_email: actions@github.com
          commit_author: readme-scribe 🤖 <actions@github.com>
```

Created a GITBOOK\_TOKEN which lives in my 'secrets' section of github and was generated from the developer settings under my profile. It must be prefixed with `secrets.` in the action. It doesn't work if you just try and use `GITBOOK_TOKEN` or whatever you decide to call your secret.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.owain.codes/git/git-actions/create-a-readme-file-automatically.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
