Skip to content

GITBOOK-sentinal-hub-playground-10: No subject #2948

GITBOOK-sentinal-hub-playground-10: No subject

GITBOOK-sentinal-hub-playground-10: No subject #2948

Workflow file for this run

name: Build
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Validate and format JSON
run: node src/lint-json.mjs
- name: Run node script to update categories
run: |
node src/categories.mjs
- name: Detect changes
uses: dorny/paths-filter@v3
id: changes
with:
base: HEAD
filters: |
all:
- '**'
categories:
- 'gitbook/categories/**'
tools:
- 'gitbook/tools/**'
- name: Commit categories
if: steps.changes.outputs.categories == 'true'
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add gitbook/categories
git commit -m "Build: Update Categories"
- name: Commit tools
if: steps.changes.outputs.tools == 'true'
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add gitbook/tools
git commit -m "Build: Update Tools"
- name: Push changes
if: steps.changes.outputs.all == 'true'
uses: ad-m/github-push-action@master
with:
branch: build
force: true
- name: Create Pull Request
if: steps.changes.outputs.all == 'true'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: build
commit-message: "Build: Update all"
title: "Update Build"
body: "This pull request updates the build based on latest changes."