Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,17 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
- name: Install Nix
uses: cachix/install-nix-action@v26
- name: Use cachix
uses: cachix/cachix-action@v14
with:
mdbook-version: 'latest'
- name: Install mdbook plugins
shell: bash
run: |
for i in mdbook-admonish mdbook-linkcheck mdbook-i18n-helpers mdbook-toc mdbook-cmdrun
do
cargo install "$i"
done
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- name: Build
run: |
mdbook build
devenv shell mdbook build
for po_lang in zh-CN
do
POT_CREATION_DATE=$(grep --max-count 1 '^"POT-Creation-Date:' po/$po_lang.po | sed -E 's/".*: (.*)\\n"/\1/')
Expand All @@ -65,7 +62,7 @@ jobs:
MDBOOK_BOOK__LANGUAGE=$po_lang \
MDBOOK_OUTPUT__HTML__SITE_URL=/rsdk/$po_lang/ \
MDBOOK_OUTPUT__HTML__REDIRECT='{}' \
mdbook build -d book/$po_lang
devenv shell mdbook build -d book/$po_lang
mv book/$po_lang/html book/html/$po_lang
echo "::endgroup::"
done
Expand Down
4 changes: 2 additions & 2 deletions devenv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1749903597,
"lastModified": 1756819007,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "41da1e3ea8e23e094e5e3eeb1e6b830468a7399e",
"rev": "aaff8c16d7fc04991cac6245bee1baa31f72b1e1",
"type": "github"
},
"original": {
Expand Down
31 changes: 11 additions & 20 deletions src/share/rsdk/infra-package/.github/workflows/docs.yaml.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -49,34 +49,25 @@ function(
},
},
{
name: "Setup mdBook",
uses: "peaceiris/actions-mdbook@v2",
name: "Install Nix",
uses: "cachix/install-nix-action@v26",
},
{
name: "Use cachix",
uses: "cachix/cachix-action@v14",
with: {
"mdbook-version": "latest",
name: devenv,
},
},
{
name: "Install mdbook plugins",
shell: "bash",
run: |||
plugins=(
mdbook-admonish
mdbook-linkcheck
mdbook-i18n-helpers
mdbook-toc
mdbook-cmdrun
)
for i in "${plugins[@]}"
do
cargo install "$i"
done
|||,
name: "Install devenv.sh",
run: "nix profile install nixpkgs#devenv",
},
{
name: "Build",
shell: "bash",
run: |||
mdbook build
devenv shell mdbook build
for po_lang in zh-CN
do
POT_CREATION_DATE=$(grep --max-count 1 '^"POT-Creation-Date:' po/$po_lang.po | sed -E 's/".*: (.*)\\n"/\1/')
Expand All @@ -92,7 +83,7 @@ function(
MDBOOK_BOOK__LANGUAGE=$po_lang \
MDBOOK_OUTPUT__HTML__SITE_URL=/%(target)s/$po_lang/ \
MDBOOK_OUTPUT__HTML__REDIRECT='{}' \
mdbook build -d book/$po_lang
devenv shell mdbook build -d book/$po_lang
mv book/$po_lang/html book/html/$po_lang
echo "::endgroup::"
done
Expand Down
14 changes: 7 additions & 7 deletions src/share/rsdk/infra-package/devenv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1746807397,
"owner": "cachix",
"repo": "devenv-nixpkgs",
"rev": "c5208b594838ea8e6cca5997fbf784b7cca1ca90",
"lastModified": 1756819007,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "aaff8c16d7fc04991cac6245bee1baa31f72b1e1",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "rolling",
"repo": "devenv-nixpkgs",
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
Expand Down
Loading
Loading