File tree Expand file tree Collapse file tree 7 files changed +27
-9
lines changed Expand file tree Collapse file tree 7 files changed +27
-9
lines changed Original file line number Diff line number Diff line change 1
1
---
2
+ name : Build
3
+ inputs :
4
+ base-url :
5
+ required : true
6
+
2
7
runs :
3
- using : " Composite"
8
+ using : Composite
4
9
steps :
5
10
- name : Install npm Modules
6
11
uses : ./.github/actions/install-npm-modules
7
12
8
13
- name : Build
9
14
run : npm run build
15
+ env :
16
+ BASE_URL : ${{ inputs.base-url }}
10
17
shell : bash
Original file line number Diff line number Diff line change 1
1
---
2
+ name : Execute Notebooks
3
+
2
4
runs :
3
- using : " Composite"
5
+ using : Composite
4
6
steps :
5
7
- name : Install Python Modules
6
8
uses : ./.github/actions/install-python-modules
Original file line number Diff line number Diff line change 1
1
---
2
+ name : Install Node Modules
3
+
2
4
runs :
3
- using : " Composite"
5
+ using : Composite
4
6
steps :
5
7
- name : Setup Node.js
6
8
uses : actions/setup-node@v3
Original file line number Diff line number Diff line change 1
1
---
2
+ name : Install Python Modules
3
+
2
4
runs :
3
- using : " Composite"
5
+ using : Composite
4
6
steps :
5
7
- name : Setup Python
6
8
uses : actions/setup-python@v4
Original file line number Diff line number Diff line change 15
15
16
16
- name : Build
17
17
uses : ./.github/actions/build
18
+ with :
19
+ base-url : /
Original file line number Diff line number Diff line change 8
8
- reopened
9
9
- synchronize
10
10
- closed
11
- branches-ignore :
12
- - " **"
13
11
14
12
concurrency : preview-${{ github.ref }}
15
13
@@ -22,12 +20,17 @@ jobs:
22
20
uses : actions/checkout@v3
23
21
24
22
- name : Execute Notebooks
25
- uses : ./.github/actions/execute_notebooks
23
+ uses : ./.github/actions/execute-notebooks
24
+
25
+ - name : Calculate BASE_URL
26
+ run : echo ${{ github.ref }} | sed "s/[^0-9]//g" | (v=$(cat); echo -e "BASE_URL=/pr-preview/pr-$v/" ) >> $GITHUB_ENV
26
27
27
28
- name : Build
28
29
uses : ./.github/actions/build
30
+ with :
31
+ base-url : $BASE_URL
29
32
30
33
- name : Deploy preview
31
34
uses : rossjrw/pr-preview-action@v1
32
35
with :
33
- source-dir : ./ build/
36
+ source-dir : build
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const config = {
13
13
title : "Introduction to Algorithms" ,
14
14
// tagline: '',
15
15
url : "https://sikepuri-algorithm.github.io" ,
16
- baseUrl : "/" ,
16
+ baseUrl : process . env . BASE_URL ,
17
17
onBrokenLinks : "throw" ,
18
18
onBrokenMarkdownLinks : "warn" ,
19
19
favicon : "img/favicon.ico" ,
You can’t perform that action at this time.
0 commit comments