File tree Expand file tree Collapse file tree 3 files changed +55
-6
lines changed Expand file tree Collapse file tree 3 files changed +55
-6
lines changed Original file line number Diff line number Diff line change 6
6
- image : circleci/python:3.8.2
7
7
steps :
8
8
- checkout
9
- - run : python -m pip install --upgrade pip
10
- - run : python -m pip install -r requirements.txt
11
- - run : export
12
- - run : make clean
13
- - run : make html
9
+ - run :
10
+ name : install dependencies
11
+ command : |
12
+ python -m pip install --upgrade pip
13
+ python -m pip install -r requirements.txt
14
+ export
15
+ - run :
16
+ name : build the static website
17
+ command : |
18
+ make clean
19
+ make html
20
+ python ./build_tools/circleci/post_processing.py ./127.0.0.1\:8050
14
21
- store_artifacts :
15
22
path : ./127.0.0.1:8050
16
- destination : doc
23
+ destination : .
17
24
- persist_to_workspace :
18
25
root : ./127.0.0.1:8050
19
26
paths : .
Original file line number Diff line number Diff line change
1
+ on : [status]
2
+ jobs :
3
+ circleci_artifacts_redirector_job :
4
+ runs-on : ubuntu-latest
5
+ name : Run CircleCI artifacts redirector
6
+ steps :
7
+ - name : GitHub Action step
8
+ uses : larsoner/circleci-artifacts-redirector-action@master
9
+ with :
10
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
11
+ artifact-path : 0/index.html
12
+ circleci-jobs : python3
Original file line number Diff line number Diff line change
1
+ import os
2
+ import sys
3
+
4
+
5
+ def inject_index_html (filename ):
6
+ with open (filename , "r" ) as f :
7
+ content = f .readlines ()
8
+
9
+ PATTERNS = [
10
+ "/assets" ,
11
+ "/_dash" ,
12
+ ]
13
+
14
+ for line_idx in range (len (content )):
15
+ for p in PATTERNS :
16
+ content [line_idx ] = content [line_idx ].replace (
17
+ p , "/0" + p
18
+ )
19
+ content [line_idx ] = content [line_idx ].replace (
20
+ '"requests_pathname_prefix": "/"' ,
21
+ '"requests_pathname_prefix": "/0/"'
22
+ )
23
+
24
+ with open (filename , "w" ) as f :
25
+ f .writelines (content )
26
+
27
+
28
+ if __name__ == "__main__" :
29
+ filename = os .path .join (sys .argv [1 ], "index.html" )
30
+ inject_index_html (filename )
You can’t perform that action at this time.
0 commit comments