Files
2026-11-14 10:45:13 -08:00

34 lines
963 B
YAML

on:
push:
branches:
- master
paths:
- 'doc/'
name: TOC Generator
permissions:
contents: read
jobs:
generateTOC:
if: github.repository == 'CleverRaven/Cataclysm-DDA'
name: Update the table of contents
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- run: npx doctoc --github --title "*Contents*" --update-only doc/
- name: Create Pull Request
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6
with:
commit-message: Update the table of contents
branch: update-toc
token: ${{ secrets.TX_PR_CREATOR }}
title: Update the table of contents in doc/JSON/JSON_INFO.md
body: |
```sh
#### Summary
None
npx doctoc doc/JSON/JSON_INFO.md --github
```