diff --git a/.gitea/workflows/lint.yml b/.gitea/workflows/lint.yml new file mode 100644 index 0000000..3b8cf9a --- /dev/null +++ b/.gitea/workflows/lint.yml @@ -0,0 +1,27 @@ +name: Lint + +# Style checks for work that hasn't reached master yet. Master pushes are +# linted inside the build job of deploy.yml -- restricting this workflow to +# branches and PRs avoids a second dependency install on master. +on: + push: + branches-ignore: [master] + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Lint Markdown + run: npx markdownlint-cli2 diff --git a/README.md b/README.md index 2c7a33e..6ef4e16 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,10 @@ seconds. The workflow also supports manual dispatch from the Gitea Actions tab. server runs BT Panel (BTPanel) + nginx, which serves the synced `public/` output directly as the webroot. +A separate [lint workflow](.gitea/workflows/lint.yml) runs the same Markdown lint on +pushes to non-`master` branches and on pull requests, so style feedback arrives +without duplicating the master deploy chain's dependency install. + ## Support This is a personal site, but questions and corrections are welcome — open an issue at