Skip to content

Commit b45bc91

Browse files
committed
Move all website-related files into www
1 parent a4db04c commit b45bc91

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

.github/workflows/ts-pages.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
steps:
1919
- name: Download repository
2020
uses: actions/checkout@v4
21+
- name: Change directory
22+
run: cd www
2123

2224
- name: Build TypeScript
2325
run: tsc
@@ -27,7 +29,7 @@ jobs:
2729
- name: Compress & Upload pages artifact
2830
uses: actions/upload-pages-artifact@v3
2931
with:
30-
path: "./www" # Website root
32+
path: "." # Website root
3133

3234
- name: Deploy to GitHub Pages
3335
id: deployment

.vscode/tasks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"tasks": [
44
{
55
"type": "typescript",
6-
"tsconfig": "tsconfig.json",
6+
"tsconfig": "www/tsconfig.json",
77
"option": "watch",
88
"problemMatcher": ["$tsc-watch"],
99
"group": "build",

www/.rm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tsconfig.json

build.py renamed to www/build.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,24 @@ def handle_starttag(self, tag, attrs):
2323

2424
html_files = {}
2525

26-
for dir, subdirs, files in os.walk("./www"):
26+
for dir, subdirs, files in os.walk("."):
2727
if (not subdirs and not files) or (
2828
all([file.startswith(".") for file in files])
2929
and all([subdir.startswith(".") for subdir in subdirs])
3030
):
3131
shutil.rmtree(dir)
3232
continue
3333

34+
if os.path.isfile(os.path.join(dir, ".rm")):
35+
for file in [
36+
os.path.join(dir, i.strip())
37+
for i in open(os.path.join(dir, ".rm"), "r").read().strip().splitlines()
38+
]:
39+
if os.path.isdir(file):
40+
shutil.rmtree(file)
41+
elif os.path.isfile(file):
42+
os.remove(file)
43+
3444
for file in files:
3545
if file.startswith(".") or file.endswith(".ts"):
3646
os.remove(os.path.join(dir, file))
File renamed without changes.

0 commit comments

Comments
 (0)