Skip to content

Commit 4e965e8

Browse files
committed
chore: CIにtextlintの実行を追加
1 parent 68fd6fd commit 4e965e8

File tree

2 files changed

+42
-79
lines changed

2 files changed

+42
-79
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,60 @@
1-
# Based on ripgrep's release action:
2-
# https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/release.yml
3-
41
name: CI/CD for Documentation
5-
on: [push, pull_request]
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
610
permissions:
711
contents: write
12+
813
jobs:
914
build-and-deploy:
10-
name: build-and-deploy
11-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-24.04
1216
steps:
13-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1418
- uses: dtolnay/rust-toolchain@master
1519
with:
16-
toolchain: '1.77'
20+
toolchain: "1.77"
1721
- uses: Swatinem/rust-cache@v2
1822
- uses: jdx/mise-action@v2
1923
- run: uv sync --locked
2024
- run: mise run generate-docs
2125
- run: mise run generate-web
22-
# deploy ./dist to https://github.com/typst-doc-cn/typst-doc-cn.github.io
2326
- name: Deploy
2427
if: github.ref == 'refs/heads/main'
2528
uses: JamesIves/github-pages-deploy-action@v4
2629
with:
2730
folder: dist # The folder the action should deploy.
31+
32+
textlint-md:
33+
runs-on: ubuntu-24.04
34+
steps:
35+
- name: Checkout the repository
36+
uses: actions/checkout@v4
37+
- name: Setup tools
38+
uses: jdx/mise-action@#v2
39+
- name: Install dependencies
40+
run: bun install --frozen-lockfile
41+
- name: Lint Markdown using textlint
42+
run: bun run --bun textlint-md
43+
44+
textlint-html:
45+
runs-on: ubuntu-24.04
46+
steps:
47+
- name: Checkout the repository
48+
uses: actions/checkout@v4
49+
- uses: dtolnay/rust-toolchain@master
50+
with:
51+
toolchain: "1.77"
52+
- uses: Swatinem/rust-cache@v2
53+
- uses: jdx/mise-action@v2
54+
- run: uv sync --locked
55+
- run: mise run generate-docs
56+
- run: mise run generate-web
57+
- name: Install dependencies
58+
run: bun install --frozen-lockfile
59+
- name: Lint HTML using textlint
60+
run: bun run --bun textlint-html

0 commit comments

Comments
 (0)