Skip to content

Bump actions/setup-node from 1 to 4 #31

Bump actions/setup-node from 1 to 4

Bump actions/setup-node from 1 to 4 #31

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@v4
with:
node-version: 14
- name: Checkout repository
uses: actions/checkout@v3
- 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 "eiriksm@users.noreply.github.com"
git add README.md
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
git push