chore: textlintを導入 #207
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI/CD for Documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-deploy: | |
| name: build-and-deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: "1.77" | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: jdx/mise-action@v2 | |
| - run: uv sync --locked | |
| - run: mise run generate-docs | |
| - run: mise run generate-web | |
| # deploy ./dist to https://github.com/typst-doc-cn/typst-doc-cn.github.io | |
| - name: Deploy | |
| if: github.ref == 'refs/heads/main' | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| folder: dist # The folder the action should deploy. | |
| textlint-md: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
| - name: Setup tools | |
| uses: jdx/mise-action@d6e32c1796099e0f1f3ac741c220a8b7eae9e5dd # v2 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Lint Markdown using textlint | |
| run: bun run --bun textlint-md | |
| textlint-html: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
| - name: Setup tools | |
| uses: jdx/mise-action@d6e32c1796099e0f1f3ac741c220a8b7eae9e5dd # v2 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Lint HTML using textlint | |
| run: bun run --bun textlint-html |