~repos /website
git clone https://pyrossh.dev/repos/website.git
木 Personal website of pyrossh. Built with astrojs, shiki, vite.
ce593795
—
pyrossh 1 year ago
Fix base path
- .github/workflows/deploy.yml +9 -9
- svelte.config.js +1 -1
.github/workflows/deploy.yml
CHANGED
|
@@ -4,11 +4,6 @@ on:
|
|
|
4
4
|
push:
|
|
5
5
|
branches: [$default-branch]
|
|
6
6
|
|
|
7
|
-
permissions:
|
|
8
|
-
contents: read
|
|
9
|
-
pages: write
|
|
10
|
-
id-token: write
|
|
11
|
-
|
|
12
7
|
concurrency:
|
|
13
8
|
group: 'pages'
|
|
14
9
|
cancel-in-progress: false
|
|
@@ -17,7 +12,7 @@ jobs:
|
|
|
17
12
|
build:
|
|
18
13
|
runs-on: ubuntu-latest
|
|
19
14
|
steps:
|
|
20
|
-
- uses: actions/checkout@
|
|
15
|
+
- uses: actions/checkout@v4
|
|
21
16
|
- uses: actions/configure-pages@v4
|
|
22
17
|
- uses: actions/setup-node@v4
|
|
23
18
|
with:
|
|
@@ -25,17 +20,22 @@ jobs:
|
|
|
25
20
|
cache: npm
|
|
26
21
|
- run: npm ci
|
|
27
22
|
- run: npm run build
|
|
23
|
+
env:
|
|
24
|
+
BASE_PATH: '/${{ github.event.repository.name }}'
|
|
28
25
|
- uses: actions/upload-pages-artifact@v3
|
|
29
26
|
with:
|
|
30
|
-
path:
|
|
27
|
+
path: 'build/'
|
|
31
28
|
|
|
32
29
|
deploy:
|
|
33
|
-
runs-on: ubuntu-latest
|
|
34
30
|
needs: build
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
permissions:
|
|
33
|
+
pages: write
|
|
34
|
+
id-token: write
|
|
35
35
|
environment:
|
|
36
36
|
name: github-pages
|
|
37
37
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
38
38
|
steps:
|
|
39
|
-
- name: Deploy
|
|
39
|
+
- name: Deploy
|
|
40
40
|
id: deployment
|
|
41
41
|
uses: actions/deploy-pages@v4
|
svelte.config.js
CHANGED
|
@@ -11,7 +11,7 @@ const config = {
|
|
|
11
11
|
strict: true
|
|
12
12
|
}),
|
|
13
13
|
paths: {
|
|
14
|
-
base: process.argv.includes('dev') ? '' :
|
|
14
|
+
base: process.argv.includes('dev') ? '' : process.env.BASE_PATH
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
};
|