Skip to content

Commit a792363

Browse files
committed
Clean up code, add scss, fix LICENSE, add build script, optimize output
1 parent 77dab55 commit a792363

File tree

157 files changed

+706
-233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+706
-233
lines changed

.github/workflows/deploy-pages.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,37 @@
11
name: Deploy website to GitHub Pages
22

33
on:
4-
# Automatically deploy when changes are made
54
push:
6-
branches: ["main"]
7-
8-
# Allow manual redeployment
95
workflow_dispatch:
106

11-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
127
permissions:
138
contents: read
149
pages: write
1510
id-token: write
1611

17-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18-
# However, do not cancel in-progress runs as we want to allow these production deployments to complete.
1912
concurrency:
2013
group: "pages"
2114
cancel-in-progress: false
2215

2316
jobs:
24-
build: # Compile TypeScript, build website, prepare for deployment
17+
build:
2518
runs-on: ubuntu-latest
2619
steps:
2720
- name: Checkout repository
2821
uses: actions/checkout@v4
2922
- name: Setup Pages
3023
uses: actions/configure-pages@v5
3124

32-
- name: Compile TypeScript
33-
run: tsc
34-
- name: Remove TypeScript source files # Not required, so just clean it up
35-
run: rm -rf ./www/ts
25+
- name: Run build script
26+
run: bash ./build.sh
3627

3728
- name: Upload artifact
3829
uses: actions/upload-pages-artifact@v3
3930
with:
40-
path: "./www" # Only upload website
31+
path: "./www"
4132

42-
deploy: # Deploy prepared page
33+
deploy:
34+
if: github.ref == 'refs/heads/main'
4335
environment:
4436
name: github-pages
4537
url: ${{ steps.deployment.outputs.page_url }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
js/
21
node_modules/

.vscode/copyright.code-snippets

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"prefix": "!copyright-html",
44
"body": [
55
"<!--",
6-
" baer1 website\n Copyright (C) 2024 baer1\n\n This website is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n A copy of the GNU General Public License can be found on this website's\n GitHub repository (LICENSE). If not, see <https://www.gnu.org/licenses/>.\n\n [email protected]",
6+
" baer1 website\n Copyright (C) 2024 baer1\n\n This website is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n A copy of the GNU General Public License can be found on this website's\n GitHub repository (LICENSE). If not, see <https://www.gnu.org/licenses/>.\n\n [email protected]",
77
"-->\n",
88
],
99
"description": "Insert copyright notice formatted for HTML",
@@ -12,15 +12,15 @@
1212
"prefix": "!copyright-js",
1313
"body": [
1414
"/*",
15-
" baer1 website\n Copyright (C) 2024 baer1\n\n This website is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n A copy of the GNU General Public License can be found on this website's\n GitHub repository (LICENSE). If not, see <https://www.gnu.org/licenses/>.\n\n [email protected]",
15+
" baer1 website\n Copyright (C) 2024 baer1\n\n This website is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n A copy of the GNU General Public License can be found on this website's\n GitHub repository (LICENSE). If not, see <https://www.gnu.org/licenses/>.\n\n [email protected]",
1616
"*/\n",
1717
],
1818
"description": "Insert copyright notice formatted for JS and CSS",
1919
},
2020
"Copyright": {
2121
"prefix": "!copyright",
2222
"body": [
23-
" baer1 website\n Copyright (C) 2024 baer1\n\n This website is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n A copy of the GNU General Public License can be found on this website's\n GitHub repository (LICENSE). If not, see <https://www.gnu.org/licenses/>.\n\n [email protected]",
23+
" baer1 website\n Copyright (C) 2024 baer1\n\n This website is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n A copy of the GNU General Public License can be found on this website's\n GitHub repository (LICENSE). If not, see <https://www.gnu.org/licenses/>.\n\n [email protected]",
2424
],
2525
"description": "Insert copyright notice",
2626
},

.vscode/tasks.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@
1212
"presentation": {
1313
"reveal": "silent"
1414
}
15+
},
16+
{
17+
"type": "shell",
18+
"command": ["node ./node_modules/sass/sass.js", "--watch", "."],
19+
"group": "build",
20+
"label": "sass: watch",
21+
"runOptions": { "runOn": "folderOpen" },
22+
"presentation": {
23+
"reveal": "silent"
24+
}
1525
}
1626
]
1727
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ the "copyright" line and a pointer to where the full notice is found.
634634
---
635635

636636
baer1 website
637-
Copyright (C) 2024 baer1
637+
Copyright (C) 2024 baer1
638638

639639
This website is free software: you can redistribute it and/or modify
640640
it under the terms of the GNU General Public License as published by

build.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "Installing dependencies from npm..."
5+
npm i
6+
7+
echo "Building typescript..."
8+
node ./node_modules/typescript/bin/tsc
9+
bash ./www/ts/postbuild.sh
10+
11+
echo "Building scss..."
12+
node ./node_modules/sass/sass.js .
13+
bash ./www/scss/postbuild.sh

0 commit comments

Comments
 (0)