Skip to content

Commit 2067c17

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

File tree

1 file changed

+46
-9
lines changed

1 file changed

+46
-9
lines changed

.github/workflows/deploy.yml

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,64 @@
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
26+
- name: Upload build artifacts
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: build-artifacts
30+
path: dist
2331
- name: Deploy
2432
if: github.ref == 'refs/heads/main'
2533
uses: JamesIves/github-pages-deploy-action@v4
2634
with:
2735
folder: dist # The folder the action should deploy.
36+
37+
textlint-md:
38+
runs-on: ubuntu-24.04
39+
steps:
40+
- name: Checkout the repository
41+
uses: actions/checkout@v4
42+
- name: Setup tools
43+
uses: jdx/mise-action@#v2
44+
- name: Install dependencies
45+
run: bun install --frozen-lockfile
46+
- name: Lint Markdown using textlint
47+
run: bun run --bun textlint-md
48+
49+
textlint-html:
50+
runs-on: ubuntu-24.04
51+
needs: build-and-deploy
52+
steps:
53+
- name: Checkout the repository
54+
uses: actions/checkout@v4
55+
- name: Download build artifacts
56+
uses: actions/download-artifact@v4
57+
with:
58+
name: build-artifacts
59+
path: dist
60+
- uses: jdx/mise-action@v2
61+
- name: Install dependencies
62+
run: bun install --frozen-lockfile
63+
- name: Lint HTML using textlint
64+
run: bun run --bun textlint-html

0 commit comments

Comments
 (0)