Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add toc and lint workflow #2

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4

- run: yarn install

- name: Lint
run: yarn lint
39 changes: 39 additions & 0 deletions .github/workflows/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: toc

on:
push:
branches:
- main

jobs:
toc:
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4

- run: yarn install

- name: Generate TOC
run: yarn toc

- name: Create PR
uses: peter-evans/create-pull-request@v6
with:
commit-message: 'docs: update TOC'
title: 'docs: update TOC'
body: This PR updates the table of contents.
branch: toc-update
base: main
labels: toc
reviewers: >
MaikoTan
Echoring
draft: false
branch-suffix: short-commit-hash
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
7 changes: 7 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
default: true

# MD013/line-length
MD013: false

# MD033/no-inline-html
MD033: false
23 changes: 23 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "macrology",
"version": "0.0.0-dev",
"description": "Workspace for writing macrology",
"main": "index.js",
"repository": "[email protected]:FFXIVMacrology/Macrology.git",
"author": {
"name": "Maiko Tan",
"email": "[email protected]",
"url": "https://github.com/MaikoTan"
},
"license": "CC-BY-SA-4.0",
"private": true,
"scripts": {
"lint": "markdownlint -f *.md",
"toc": "md-magic -p '*.md'"
},
"devDependencies": {
"@types/node": "^20.11.30",
"markdown-magic": "^2.6.1",
"markdownlint-cli": "^0.39.0"
}
}
Loading
Loading