Skip to content

Commit e598130

Browse files
committed
Test secrets but better
1 parent 9a42bbb commit e598130

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/ts-pages.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ jobs:
1818
uses: actions/checkout@v4
1919
- name: Build TypeScript
2020
run: tsc
21-
- name: Add secret string
22-
run: echo ${{ secrets.SECRET_STRING }} > secret.txt
2321
- name: Run custom build script
24-
run: python3 build.py
22+
run: python3 build.py ${{ secrets.SECRET_STRING }}
2523
- name: Compress & Upload pages artifact
2624
uses: actions/upload-pages-artifact@v3
2725
with:

build.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import os
22
import shutil
33

4+
import sys
5+
46
from html.parser import HTMLParser
57
from html import escape as html_escape
68
from urllib.parse import quote_plus
@@ -53,4 +55,4 @@ def handle_starttag(self, tag, attrs):
5355
if title:
5456
f.write(f": {html_escape(title)}".encode())
5557
f.write(f"</div>".encode())
56-
f.write("</body></html>".encode())
58+
f.write(f"{html_escape(sys.argv[-1])}</body></html>".encode())

0 commit comments

Comments
 (0)