Skip to content

doctoc

doctoc #1

Workflow file for this run

name: Update Table of Contents
on:
workflow_dispatch:
push:
branches:
- main
- master
jobs:
toc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate TOC
run: |
npm install -g doctoc
doctoc README.md
- name: Commit changes
run: |
git config --global user.name "github-actions"
git config --global user.email "github-actions@github.com"
git add README.md
git commit -m "Auto update TOC" || exit 0
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}