File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 33
33
uses : actions/checkout@v4
34
34
- name : Setup Pages
35
35
uses : actions/configure-pages@v5
36
+ - name : Build index-final.html
37
+ run : |
38
+ python build.py
36
39
- name : Upload artifact
37
40
uses : actions/upload-pages-artifact@v3
38
41
with :
Original file line number Diff line number Diff line change
1
+ # build.py
2
+ html = open ('index.html' ).read ()
3
+ css = open ('style.css' ).read ()
4
+ js = open ('app.js' ).read ()
5
+
6
+ # Zakładam, że index.html ma <head>...</head> i </body>
7
+ # Dodaj CSS do <head>
8
+ html = html .replace (
9
+ '</head>' ,
10
+ f'<style>\n { css } \n </style>\n </head>'
11
+ )
12
+ # Dodaj JS na końcu przed </body>
13
+ html = html .replace ('<script src="app.js"></script>' ,'' );
14
+ html = html .replace (
15
+ '</body>' ,
16
+ f'<script>\n { js } \n </script>\n </body>'
17
+ )
18
+
19
+ with open ('index-final.html' , 'w' ) as f :
20
+ f .write (html )
You can’t perform that action at this time.
0 commit comments