Skip to content

Instantly share code, notes, and snippets.

@paul
Created September 18, 2020 22:43
Show Gist options
  • Select an option

  • Save paul/8dd0fb3c5362dbae2c99f3802cb638b8 to your computer and use it in GitHub Desktop.

Select an option

Save paul/8dd0fb3c5362dbae2c99f3802cb638b8 to your computer and use it in GitHub Desktop.

Revisions

  1. paul created this gist Sep 18, 2020.
    31 changes: 31 additions & 0 deletions wiki_toc.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    # .github/workflows/wiki_toc.yml

    name: Update wiki table of contents

    on:
    - gollum

    jobs:
    run:
    runs-on: ubuntu-latest
    container:
    image: ruby:2.6.6
    steps:
    - uses: actions/checkout@v2
    with:
    repository: ${{github.repository}}.wiki
    - name: Update Wiki TOC
    run: |
    gem install tocer -v '~>9.1'
    tocer -g
    - name: Commit changes
    run: |
    git config --local user.email "[email protected]"
    git config --local user.name "GitHub Action"
    git add .
    git commit -m "Updated TOC"
    - name: Push changes
    uses: ad-m/github-push-action@master
    with:
    repository: ${{github.repository}}.wiki
    github_token: ${{ secrets.GITHUB_TOKEN }}