Skip to content

Commit d5325f0

Browse files
committed
chore: CIにtextlintの実行を追加
1 parent 620ef55 commit d5325f0

File tree

1 file changed

+48
-9
lines changed

1 file changed

+48
-9
lines changed

.github/workflows/deploy.yml

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,66 @@
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+
continue-on-error: true
49+
50+
textlint-html:
51+
runs-on: ubuntu-24.04
52+
needs: build-and-deploy
53+
steps:
54+
- name: Checkout the repository
55+
uses: actions/checkout@v4
56+
- name: Download build artifacts
57+
uses: actions/download-artifact@v4
58+
with:
59+
name: build-artifacts
60+
path: dist
61+
- uses: jdx/mise-action@v2
62+
- name: Install dependencies
63+
run: bun install --frozen-lockfile
64+
- name: Lint HTML using textlint
65+
run: bun run --bun textlint-html
66+
continue-on-error: true

0 commit comments

Comments
 (0)