Skip to content

Bump actions/checkout from 3 to 4 (#6) #33

Bump actions/checkout from 3 to 4 (#6)

Bump actions/checkout from 3 to 4 (#6) #33

Workflow file for this run

name: Generate TOC
on:
- push
- pull_request
jobs:
test:
name: Generate TOC and check if we need to create a PR
runs-on: ubuntu-latest
env:
CI_COMMIT_MESSAGE: Update TOC
CI_COMMIT_AUTHOR: TOC generator
timeout-minutes: 5
steps:
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Build commands
run: node TOC.js > README.md
- name: Check git diff
run: git diff --exit-code README.md
id: git-diff
continue-on-error: true
- name: GIT Commit Build Artifacts (coverage, dist, devdist, docs)
if: github.event_name == 'push' && steps.git-diff.outcome == 'failure' && steps.git-diff.conclusion == 'success'
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "[email protected]"
git add README.md
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
git push