41 lines
1.0 KiB
YAML
41 lines
1.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ '*' ]
|
|
|
|
jobs:
|
|
stitchmd:
|
|
name: Check or update style.md
|
|
runs-on: ubuntu-latest
|
|
|
|
# Needed to give the job permission
|
|
# to push to branches.
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Check or update style.md
|
|
uses: abhinav/stitchmd-action@v1
|
|
with:
|
|
# For pull requests, run in 'write' mode so that edits made
|
|
# directly in the GitHub UI get propagated to style.md
|
|
# without a local checkout.
|
|
#
|
|
# Otherwise, run in 'check' mode to fail CI if style.md is out-of-date.
|
|
mode: ${{ github.event_name == 'pull_request' && 'write' || 'check' }}
|
|
summary: src/SUMMARY.md
|
|
preface: src/preface.txt
|
|
output: style.md
|
|
|
|
- uses: stefanzweifel/git-auto-commit-action@v5
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
with:
|
|
file_pattern: style.md
|
|
commit_message: 'Auto-update style.md'
|