-
Notifications
You must be signed in to change notification settings - Fork 11
66 lines (61 loc) · 1.7 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: CI/CD for Documentation
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- 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
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: dist
- 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@v4
- name: Setup tools
uses: jdx/mise-action@v2
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Lint Markdown using textlint
run: bun run --bun textlint-md
continue-on-error: true
textlint-html:
runs-on: ubuntu-24.04
needs: build-and-deploy
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: dist
- uses: jdx/mise-action@v2
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Lint HTML using textlint
run: bun run --bun textlint-html
continue-on-error: true