File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 27
27
28
28
- name : Install pnpm
29
29
run : npm install -g pnpm
30
-
30
+
31
31
- name : Setup Node
32
32
uses : actions/setup-node@v4
33
33
with :
45
45
46
46
- name : Build with Astro
47
47
run : |
48
- pnpm astro build \
48
+ GITHUB_PAGES=true pnpm astro build \
49
49
--site "${{ steps.pages.outputs.origin }}" \
50
50
--base "${{ steps.pages.outputs.base_path }}"
51
51
working-directory : ${{ env.BUILD_PATH }}
Original file line number Diff line number Diff line change 2
2
import { defineConfig } from "astro/config" ;
3
3
import starlight from "@astrojs/starlight" ;
4
4
5
+ const isGithubPages = process . env . GITHUB_PAGES === "true" ;
6
+
7
+ const base = isGithubPages ? "/godot-rust-faq/" : "/" ;
8
+
5
9
// https://astro.build/config
6
10
export default defineConfig ( {
7
11
redirects : {
8
- "/" : "/ how/custom_classes" ,
12
+ "/" : ` ${ base } how/custom_classes/` ,
9
13
} ,
10
14
integrations : [
11
15
starlight ( {
12
16
title : "Godot Rust FAQ" ,
13
- lastUpdated :true ,
17
+ lastUpdated : true ,
14
18
15
19
social : [
16
20
{
@@ -30,9 +34,7 @@ export default defineConfig({
30
34
} ,
31
35
{
32
36
label : "Common Errors" ,
33
- items : [
34
- "errors/errors" ,
35
- ] ,
37
+ items : [ "errors/errors" ] ,
36
38
} ,
37
39
] ,
38
40
} ) ,
You can’t perform that action at this time.
0 commit comments