Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 1.0.0 #126

Merged
merged 205 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
205 commits
Select commit Hold shift + click to select a range
2500d92
style(01/001:25): 修正大小写不规范
Zh40Le1ZOOB Jan 4, 2024
ec19b4d
typo(01/017:77): 修正错别字
Zh40Le1ZOOB Jan 4, 2024
dab6a4d
typo(01/042:89): 修正错别字
Jan 4, 2024
944e8c1
typo(01/049:43): 修正错别字
Jan 4, 2024
77ec461
typo(02/075:123): 修正错别字
Jan 4, 2024
3f9fbcf
ambig(02/076:31): 修正逻辑错误
Jan 4, 2024
e3c4283
typo(02/084:93): 修正错别字
Jan 4, 2024
bc9eefe
typo(02/088:9): 修正错别字
Jan 4, 2024
07d649a
grammar(02/088:9): 修正语序错误
Jan 4, 2024
32d1bee
typo(02/098:13): 修正错别字
Jan 4, 2024
148f29f
typo(02/098:121): 修正错别字
Jan 4, 2024
fe0c8db
typo(01/036:37): 修正错别字
tankua0 Jan 5, 2024
113eda5
ambig(01/003:27; 01/003:31): 修正逻辑错误
Zh40Le1ZOOB Jan 5, 2024
710c325
ambig(01/013:45): 修正逻辑错误
Zh40Le1ZOOB Jan 5, 2024
4fd6c41
typo(02/112:117): 修正错别字
Jan 7, 2024
2bed3c0
typo(02/082:7; 02/082:35): 修正错别字
tankua0 Jan 10, 2024
86b7e7d
ambig(02/120:105): 修正逻辑错误
Jan 12, 2024
7427832
typo(02/128:66): 修正错别字
Jan 14, 2024
826a982
ambig(02/129:79): 修正逻辑错误
Jan 15, 2024
90a2ce4
feat: 添加段落缩进
Zh40Le1ZOOB Jan 15, 2024
8e03b86
typo(02/137:103): 修正错别字
Jan 15, 2024
2c4c64b
typo(02/129:49): 修正错别字
Jan 15, 2024
6c3b1b3
ambig(02/129:103): 修正不当用词
Jan 15, 2024
de51aeb
typo(02/129:111): 修正缺字
Jan 15, 2024
28182ce
feat: 添加 Google Analytics
Zh40Le1ZOOB Jan 17, 2024
126704e
ambig(02/151:11): 修正逻辑错误
Zh40Le1ZOOB Jan 17, 2024
11c7720
feat: 支持 EPUB 与 PDF 版
Zh40Le1ZOOB Jan 17, 2024
0f635b9
feat: 添加关于页面
Zh40Le1ZOOB Jan 17, 2024
2b5d3e1
style(02/155; 04/455): 修正文件语法错误
Zh40Le1ZOOB Jan 17, 2024
a7bddfd
typo(02/155:163): 修正错别字
Zh40Le1ZOOB Jan 17, 2024
7c1db51
refactor(10/001; 10/index): 规范作者注释位置
Zh40Le1ZOOB Jan 18, 2024
6ff561d
refactor: 补充描述文本
Zh40Le1ZOOB Jan 18, 2024
05d3e9f
chore: 迁移域名
Zh40Le1ZOOB Jan 18, 2024
d613362
ambig(02/156:109): 修正逻辑错误
Jan 19, 2024
c01ec9f
typo(02/158:57): 修正错别字
Jan 19, 2024
c500150
typo(02/158:123): 修正错别字
Jan 19, 2024
aa776f2
typo(02/164:139): 修正错别字
Jan 19, 2024
e8c211a
typo(02/170:67): 修正错别字
Jan 19, 2024
af45ab0
typo(02/170:131): 修正错别字
Jan 19, 2024
4cdc282
feat: 添加图片查看器
Zh40Le1ZOOB Jan 19, 2024
c2c4d1e
feat: 添加评论区
Zh40Le1ZOOB Jan 19, 2024
3cc4ab5
ambig(01/001:11): 修正逻辑错误
Zh40Le1ZOOB Jan 20, 2024
8510a79
ambig(01/001:39): 修正歧义用词
Zh40Le1ZOOB Jan 20, 2024
61a3203
grammar(01/001:47): 通顺句子
Zh40Le1ZOOB Jan 20, 2024
7bf6858
grammar(01/001:97): 通顺句子
Zh40Le1ZOOB Jan 20, 2024
817e543
grammar(01/001:157): 修正元素缺失
Zh40Le1ZOOB Jan 20, 2024
e13f8fa
typo(01/060:137): 修正错别字
epifirumu Jan 24, 2024
c54f4bb
typo(02/061:9): 修正错别字
epifirumu Jan 24, 2024
b72d14d
typo(02/066:51): 修正错别字
epifirumu Jan 24, 2024
6f40583
ambig(02/068:143): 修正逻辑错误
epifirumu Jan 24, 2024
aa3e269
typo(02/091:95): 修正错别字
epifirumu Jan 24, 2024
e20a3a5
typo(02/096:87): 修正错别字
epifirumu Jan 24, 2024
1dc01ca
typo(02/100:99): 修正错别字
epifirumu Jan 24, 2024
14c7671
grammar(02/104:51): 修正语序错误
epifirumu Jan 24, 2024
2c1f854
typo(02/105:77): 修正错别字
epifirumu Jan 24, 2024
19d863c
typo(02/119:137): 修正错别字
epifirumu Jan 24, 2024
fb00398
typo(02/119:135): 修正多余字
Zh40Le1ZOOB Jan 24, 2024
0644d62
typo(02/151:11): 修正多余字
Zh40Le1ZOOB Jan 24, 2024
19f2081
chore: 添加自述文件
Zh40Le1ZOOB Jan 28, 2024
237412c
refactor: 补充页脚链接
Zh40Le1ZOOB Jan 28, 2024
b503518
chore: update lockfile
Zh40Le1ZOOB Jan 28, 2024
b5c9917
grammar(01/002:3): 通顺语句
Zh40Le1ZOOB Jan 29, 2024
e158fab
ambig(02/150:69): 修正歧义说法
Feb 2, 2024
841e437
ambig(02/150:75): 修正歧义说法
Feb 2, 2024
8c3d9d7
ambig(02/150:81): 修正歧义说法
Feb 2, 2024
41b805a
feat: 添加前言
Zh40Le1ZOOB Feb 2, 2024
7e492c9
typo(02/152:35): 修正缺字 (#2)
tankua0 Feb 5, 2024
cbb529c
refactor: 迁移 VitePress 配置文件路径
Zh40Le1ZOOB Feb 6, 2024
c0826a6
ambig(07/002:5): 修正逻辑错误
wuyangyang182 Feb 9, 2024
4ec0d76
ambig(*): 修正屏蔽词、歧义用词和文件语法错误 (#6)
epifirumu Feb 14, 2024
26dbbee
chore: 去除图标白边 (#6)
epifirumu Feb 14, 2024
0f67b29
punctua(04/430): 修正标点使用不规范
Zh40Le1ZOOB Feb 14, 2024
5cda500
chore: update lockfile
Zh40Le1ZOOB Feb 14, 2024
cec0090
typo(01/018:29): 修正错别字 (#8)
iuu6 Feb 17, 2024
543e6ae
typo(01/021:39): 修正错别字 (#10)
iuu6 Feb 17, 2024
220cd9e
typo(01/023:23): 修正错别字 (#11)
iuu6 Feb 17, 2024
ed76f5d
typo(01/025:19): 修正错别字 (#12)
iuu6 Feb 17, 2024
d6c66b4
typo(01/028:121): 修正错别字 (#13)
Cryolitia Feb 20, 2024
77d6d74
chore: 迁移域名
Zh40Le1ZOOB Feb 24, 2024
c61a428
chore: 添加贡献指南 (#14)
Zh40Le1ZOOB Feb 29, 2024
4622beb
chore(convention): 使类型字段的可用值更易于理解,扩展 style 类型的适用范围 (#15)
Zh40Le1ZOOB Mar 1, 2024
4c35585
grammar(*): 修正助词“的”“地”“得”使用不规范的问题 (#16)
epifirumu Mar 2, 2024
11d393a
typo(01/040:19): 修正错别字
Cryolitia Mar 6, 2024
35e49a1
chore: add auth image
Cryolitia Mar 10, 2024
531e87b
ci: 修复 `.vitepress` 目录推送无法触发工作流的问题
Zh40Le1ZOOB Mar 10, 2024
54ccb4b
chore: update lockfile
Zh40Le1ZOOB Mar 11, 2024
0f30436
ci: 移除多余空格
Zh40Le1ZOOB Mar 11, 2024
2be6223
refactor(PDF): 改进 PDF 版封面
Zh40Le1ZOOB Mar 11, 2024
0083ee5
typo(03/206:93): 修正错别字
Mar 15, 2024
f0927d4
typo(03/206:127): 修正错别字
Mar 15, 2024
b5c9b2b
typo(02/083:63): 修正错别字
Zh40Le1ZOOB Mar 16, 2024
ed9e4f9
ambig(*): 修正药品名屏蔽词 (#17)
Zh40Le1ZOOB Mar 16, 2024
793560a
punctua(04/436:97): 修正引号错误
Zh40Le1ZOOB Mar 16, 2024
46f0200
Revert "chore: add auth image"
Zh40Le1ZOOB Mar 17, 2024
816e1cd
chore(about): 添加项目关系声明
Zh40Le1ZOOB Mar 17, 2024
b8239cf
ci: publish to Cloudflare Pages
Cryolitia Mar 19, 2024
292a9e0
chore: update index
Cryolitia Mar 20, 2024
5fb64e9
feat: 支持 MOBI 版 (#21)
Zh40Le1ZOOB Mar 21, 2024
26b2068
ambig(03/205; 03/206): 修正内容歧义 (#22)
Zh40Le1ZOOB Mar 21, 2024
245cdd0
typo(01/005:121, 01/012:83, 01/027:41, 01/029:79): 修正错别字 (#29)
Zh40Le1ZOOB Mar 23, 2024
2885589
refactor(PDF): update Typst template following the mdbook-typst-pdf (…
Zh40Le1ZOOB Mar 23, 2024
7b9e5df
ci: 使用 semantic-release 自动发布电子书 (#23)
Zh40Le1ZOOB Mar 25, 2024
3504887
chore(convention): 添加 `ci` 提交类型,更改 `chore` 类型适用范围 (#26)
Zh40Le1ZOOB Mar 25, 2024
2775a00
ambig(07/023:21; 07/028:89; 07/029:5): 修正方莜莜的名字错写为“方筱筱”的问题 (#30)
Zh40Le1ZOOB Mar 25, 2024
93d3a4d
style(*): 修正换行错误 (#31)
Zh40Le1ZOOB Mar 25, 2024
9fb48a7
punctua(*): 修正引号使用错误 (#32)
Zh40Le1ZOOB Mar 25, 2024
7423207
Revert "ci: 使用 semantic-release 自动发布电子书 (#23)" (#33)
Cryolitia Mar 25, 2024
bc32c61
ci: 使用 semantic-release 自动发布电子书
Zh40Le1ZOOB Mar 25, 2024
12655ee
chore(lockfile): 添加缺失软件包,更新软件包版本
Zh40Le1ZOOB Mar 26, 2024
e4f9803
typo(*): 修正错别字与多字少字
epifirumu Mar 26, 2024
3cc2843
ci: 让 semantic-release 闭嘴
Zh40Le1ZOOB Mar 27, 2024
1e46a21
Revert "ci: 让 semantic-release 闭嘴"
Cryolitia Mar 27, 2024
f59c87a
chore: 更新 URL 和版权信息
Zh40Le1ZOOB Mar 29, 2024
1824563
fix: 修复部分阅读器无法打开epub版书籍的问题
epifirumu Mar 30, 2024
41c546c
refactor(build): 迁移至 pnpm
Zh40Le1ZOOB Apr 3, 2024
2ad5912
typo(01/003:23): 修正错别字
Apr 5, 2024
3d276d4
ci: fix build
Cryolitia Apr 6, 2024
8744898
fix(build): fix build
Zh40Le1ZOOB Apr 6, 2024
3a5bcc2
feat: introduce Nix to Github Action
Cryolitia Apr 8, 2024
f494a2c
refactor: imporve ci
Cryolitia Apr 8, 2024
a50a217
ci: clean code
Zh40Le1ZOOB Mar 27, 2024
d6cfeec
chore(convention): add alias for Type `refactor`
Zh40Le1ZOOB Apr 10, 2024
74d8059
style(03/205:115; 10/index): 移除多余字符
Zh40Le1ZOOB Apr 10, 2024
333a5b8
chore: 添加欢迎反馈的说明
Zh40Le1ZOOB Apr 8, 2024
f390bf0
ci: fix flake update, using environment
Cryolitia Apr 12, 2024
29b4252
ci(lint): add lint workflow
Zh40Le1ZOOB Apr 8, 2024
5a3f2df
flake update: 2024-04-12T04:21:01
Cryolitia Apr 12, 2024
8967e2a
chore: remove giscus
Zh40Le1ZOOB Apr 13, 2024
71db306
flake update: 2024-04-19T02:40:30
Zh40Le1ZOOB Apr 19, 2024
73c1ecf
ci: split workflow [skip ci]
Zh40Le1ZOOB Mar 27, 2024
cc1ba41
ci: change author of update flake commit
Zh40Le1ZOOB Apr 23, 2024
fcda36a
flake update: 2024-04-23T05:16:54
github-actions[bot] Apr 23, 2024
8e38024
chore: update pnpm lock file
Zh40Le1ZOOB Apr 23, 2024
343542a
ci: fix release workflow
Zh40Le1ZOOB Apr 23, 2024
4409bb1
flake update: 2024-04-26T02:37:36
github-actions[bot] Apr 26, 2024
59ea260
ci: N/A
Cryolitia Apr 26, 2024
0c1f1f5
chore: flake update 2024-05-03T02:40:13
github-actions[bot] May 3, 2024
8d36e62
chore: flake update 2024-05-10T02:42:55
github-actions[bot] May 10, 2024
1d545ee
chore(convention): add type `dep`, deprecate type `refactor`
Zh40Le1ZOOB May 10, 2024
ba59ee3
ci: use DeterminateSystems
Cryolitia May 10, 2024
b5e6d4b
dep: flake update 2024-05-10T11:14:50
github-actions[bot] May 10, 2024
b65b9fe
dep: flake update 2024-05-17T02:40:34
github-actions[bot] May 17, 2024
ba4a974
ambig(02/098:33): 修正逻辑错误
May 19, 2024
9b0c59b
ambig(03/333:99): 修正逻辑错误
tankua0 May 23, 2024
90edcc3
dep: flake update 2024-05-24T02:42:18
github-actions[bot] May 24, 2024
a8e7df7
ambig(01/002:45): 修正不当用词
Zh40Le1ZOOB May 19, 2024
3a1b0a8
typo(02/101:69): 修正错别字
Nixie24 May 25, 2024
8c18e4f
typo(02/132:77): 修正少字
WindowsMEMZ May 29, 2024
de09251
ambig(02/118:97): 修正逻辑错误
Nixie24 May 29, 2024
a59a8de
typo(02/174:17): 修正少字
WindowsMEMZ May 30, 2024
9234e52
ambig(03/211:41): 修正逻辑错误
WindowsMEMZ May 30, 2024
4eba1d0
dep: flake update 2024-05-31T02:43:13
github-actions[bot] May 31, 2024
82c27c6
typo(03/237:85): 修正错别字
WindowsMEMZ May 31, 2024
b16afd6
chore: 添加指向 GitHub Discussions 的评论区提示 (#75)
Zh40Le1ZOOB Jun 1, 2024
e83ef39
typo(03/259:109): 修正错别字
WindowsMEMZ Jun 2, 2024
4d09caf
ci: 删除运行计划时间注释 (#77)
WindowsMEMZ Jun 2, 2024
eb3420a
dep: flake update 2024-06-02T23:49:51
github-actions[bot] Jun 2, 2024
472d994
typo(02/152:77): 修正错别字
Nixie24 Jun 3, 2024
4206d32
typo(02/183:129): 修正错别字
Nixie24 Jun 3, 2024
e8aa117
typo(02/183:131): 修正错别字
Nixie24 Jun 15, 2024
8d800d8
typo(02/183:133): 修正错别字
Zh40Le1ZOOB Jun 4, 2024
a24d9c1
typo(03/201:55): 修正缺字
Zh40Le1ZOOB Jun 4, 2024
6972a6b
typo(03/209:35): 修正错别字
Zh40Le1ZOOB Jun 4, 2024
f474cb2
typo(03/275:13): 修正错别字
WindowsMEMZ Jun 4, 2024
c75baaa
typo(03/324:41): 修正错别字
WindowsMEMZ Jun 4, 2024
20d57b3
typo(03/332:7): 修正错别字
WindowsMEMZ Jun 4, 2024
2de71bd
typo(03/350:19,21): 修正错别字
WindowsMEMZ Jun 4, 2024
14eb6ff
typo(03/370:73): 修正错别字
WindowsMEMZ Jun 4, 2024
58d3621
typo(04/401:165): 修正错别字
WindowsMEMZ Jun 4, 2024
5a96d06
typo(03/381:99): 修正多字
WindowsMEMZ Jun 4, 2024
2cbaace
dep: flake update 2024-06-07T02:46:06
github-actions[bot] Jun 7, 2024
cc1f92b
dep: flake update 2024-06-14T02:45:14
github-actions[bot] Jun 14, 2024
3f538a0
ambig(02/200:105): 修正逻辑错误
epifirumu Jun 16, 2024
e1d4103
ambig(03/238:7; 03/242:133; 03/257:97): 修正角色姓名错误
epifirumu Jun 16, 2024
20d9d6e
typo(03/249:67; 03/256:119; 03/312:149): 修正错别字
epifirumu Jun 16, 2024
eaa145b
chore(convention): 细化提交规范,优化提交规范样式
Zh40Le1ZOOB Jun 16, 2024
f0c298a
dep: flake update 2024-06-21T18:31:51
github-actions[bot] Jun 21, 2024
59b13db
dep: flake update 2024-06-28T02:46:25
github-actions[bot] Jun 28, 2024
733902a
typo(01/023:53): 修正多字
yingluom Jun 30, 2024
0df1a78
typo(02/198:141): 修正错别字
Nixie24 Jul 3, 2024
c60a90d
Revert "typo(03/381:99): 修正多字"
Zh40Le1ZOOB Jul 3, 2024
ac9e0b6
ambig(03/241:47): 修正不当用词 (#111)
Zh40Le1ZOOB Jul 3, 2024
51a0b1d
typo(02/103:15): 修正错别字
Zh40Le1ZOOB Jul 3, 2024
e820626
dep: flake update 2024-07-05T02:44:53
github-actions[bot] Jul 5, 2024
56fea80
chore: update copyright text, add authentication image (#113)
Zh40Le1ZOOB Jul 8, 2024
85d8ef8
dep: flake update 2024-07-12T02:46:19
github-actions[bot] Jul 12, 2024
334398e
ci: suppress inactive repo update weekly
Cryolitia Jul 16, 2024
5ea686f
typo(03/367:109): 修正错别字
tankua0 Jul 17, 2024
3a30516
chore: add title alias
Zh40Le1ZOOB Jul 18, 2024
12e6f60
typo(05/636:37): 修正错别字
iuu6 Aug 2, 2024
99a6491
typo(05/636:117): 修正多字
iuu6 Aug 2, 2024
2485a1f
grammar(05/636:115): 修正语法错误
Zh40Le1ZOOB Aug 12, 2024
1a22400
ci: fix magic-nix-cache
Cryolitia Sep 16, 2024
78d11ce
ci: use github app instead of PAT
Cryolitia Sep 19, 2024
b87bace
dep: flake update 2024-09-19T09:22:22
github-actions[bot] Sep 19, 2024
4e00a75
rfct: migrate to vitepress-theme-project-trans
Cryolitia Sep 26, 2024
9543602
fix: 修复 GitHub 编辑链接
Leetfs Sep 26, 2024
bbc5185
dep: 升级主题包到最新 prerelease 版本
Leetfs Sep 26, 2024
7976668
fix: site logo (#121)
OverflowCat Sep 26, 2024
1216baa
fix: index style
Cryolitia Sep 26, 2024
974ae16
fix: favicon (#122)
Zh40Le1ZOOB Sep 27, 2024
36df649
dep: flake update 2024-09-27T03:02:20
github-actions[bot] Sep 27, 2024
26ef515
chore(convention): rename `refactor` to `rfct` (#123)
Zh40Le1ZOOB Sep 27, 2024
d0cd2c9
feat: improve the appearance of theme (#124)
Dolyn157 Sep 27, 2024
e11ed8a
ci: fix command not found for Semantic Release (#125)
Zh40Le1ZOOB Sep 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .autocorrectrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# yaml-language-server: $schema=https://huacnlee.github.io/autocorrect/schema.json
textRules:
哆啦A梦: 0
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.md linguist-vendored=false
*.md linguist-generated=false
*.md linguist-documentation=false
*.md linguist-detectable=true
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.github @Cryolitia
43 changes: 43 additions & 0 deletions .github/workflows/build-ebook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build ebook

on:
workflow_dispatch:
workflow_call:
pull_request:

concurrency:
group: ebook-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main

- name: Print flake metadata
run: nix flake metadata --accept-flake-config

- name: Build
run: |
sed -e "s/BUILD_TIME/$(TZ=Asia/Shanghai date -Isecond)/" -e "s/COMMIT_SHA/${{ github.sha }}/" -i src/about.md
NIXPKGS_ALLOW_UNFREE=1 nix build .# --impure --accept-flake-config

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ebook
path: |
result/share/transky-book/book/epub/药娘的天空.epub
result/share/transky-book/book/mobi/药娘的天空.mobi
result/share/transky-book/book/typst-pdf/药娘的天空.pdf
44 changes: 44 additions & 0 deletions .github/workflows/build-web.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build website

on:
workflow_dispatch:
workflow_call:
pull_request:

concurrency:
group: web-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: latest
run_install: true

- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: current

- name: Build
env:
NODE_OPTIONS: --max_old_space_size=4096
run: |
sed -e "s/BUILD_TIME/$(TZ=Asia/Shanghai date -Isecond)/" -e "s/COMMIT_SHA/${{ github.sha }}/" -i src/about.md
pnpm run build

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: website
path: src/.vitepress/dist/
45 changes: 0 additions & 45 deletions .github/workflows/build.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint

on:
pull_request:

permissions:
pull-requests: write

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: AutoCorrect
uses: huacnlee/autocorrect-action@main

- name: Report ReviewDog
if: failure()
uses: huacnlee/autocorrect-action@main
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
reviewdog: true
43 changes: 43 additions & 0 deletions .github/workflows/publish-cloudflare.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish website to cloudflare

on:
workflow_dispatch:
push:
branches:
- "main"
paths:
- ".github/workflows/build-web.yaml"
- ".github/workflows/publish-cloudflare.yaml"
- ".vitepress/**"
- "src/**"
- "package.json"
- "pnpm-lock.yaml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
uses: ./.github/workflows/build-web.yaml

publish:
needs: build
runs-on: ubuntu-latest
environment: cloudflare-pages
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: website
path: website

- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_PAGES_ACCOUNT }}
projectName: transky-book
directory: website
wranglerVersion: 3
66 changes: 66 additions & 0 deletions .github/workflows/publish-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Publish ebook to release

on:
workflow_dispatch:
push:
branches:
- "main"
- "stable"
paths:
- ".github/workflows/build-ebook.yaml"
- ".github/workflows/publish-release.yaml"
- ".releaserc"
- "src/**"
- "theme/**"
- "book.toml"
- "package.json"
- "pnpm-lock.yaml"
- "flake.nix"
- "flake.lock"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write
id-token: write

jobs:
build:
uses: ./.github/workflows/build-ebook.yaml

publish:
permissions:
contents: write
needs: build
if: ${{ !(github.event_name == 'push' && contains(github.event.head_commit.message, '[skip release]')) }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: latest
run_install: true

- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: current

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ebook
path: ebook

- name: Release ebook
env:
GITHUB_TOKEN: ${{ github.token }}
run: pnpm exec semantic-release
55 changes: 55 additions & 0 deletions .github/workflows/update-flake.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: "Update flake"

on:
workflow_dispatch:
push:
branches:
- "main"
paths:
- ".github/workflows/update-flake.yaml"
schedule:
- cron: '31 2 * * 5'

permissions:
contents: write

jobs:
sync-flake:
runs-on: ubuntu-latest
environment: flake
steps:
- uses: DeterminateSystems/nix-installer-action@main

- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.TRIGGER_APP_ID }}
private-key: ${{ secrets.TRIGGER_APP_SECRET }}

- name: Checkout
uses: actions/checkout@v4
with:
show-progress: false
token: ${{ steps.generate-token.outputs.token }}

- name: Setup Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git show -s

- name: Update flake
run: |
set +e

nix flake update --accept-flake-config
nix flake info --accept-flake-config

# suppress inactive repo update weekly
git log --pretty=format:"%s" -1 HEAD | grep "dep: flake update" && exit 0

git add .
git status
git commit -m "dep: flake update $(date +'%Y-%m-%dT%H:%M:%S')" || exit 0
git push
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
book
src/.vitepress/cache
src/.vitepress/dist
src/.vitepress/.temp
node_modules
result
Loading
Loading