Compare commits
No commits in common. "fee3c9ece148788d2f3f2e80d203c91bc50fb5e3" and "e29ea3f798c03286040f62bec19f54c9caa18215" have entirely different histories.
fee3c9ece1
...
e29ea3f798
@ -27,11 +27,11 @@ jobs:
|
||||
|
||||
- name: Minify HTML files
|
||||
run: |
|
||||
find src/ -name '*.html' ! -name '*min*' -exec sh -c 'html-minifier-terser --collapse-whitespace --remove-comments --minify-js true --minify-css true -o "${0%.html}.min.html" "$0"' {} \;
|
||||
find src/ -name '*.html' -exec sh -c 'html-minifier-terser --collapse-whitespace --remove-comments --minify-js true --minify-css true -o "${0%.html}.min.html" "$0"' {} \;
|
||||
|
||||
- name: Minify CSS files
|
||||
run: |
|
||||
find src/css/ -name '*.css' ! -name '*min*' -exec sh -c 'csso "$0" --output "${0%.css}.min.css"' {} \;
|
||||
find src/css/ -name '*.css' -exec sh -c 'csso "$0" --output "${0%.css}.min.css"' {} \;
|
||||
|
||||
- name: Commit and push changes
|
||||
env:
|
||||
|
27
default.conf
27
default.conf
@ -1,27 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.min.html;
|
||||
autoindex on;
|
||||
}
|
||||
|
||||
# TODO: This could be improved later
|
||||
location = /links {
|
||||
root /usr/share/nginx/html;
|
||||
index links.min.html;
|
||||
try_files /links.min.html =404;
|
||||
}
|
||||
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
services:
|
||||
pontus-web:
|
||||
build: .
|
||||
image: pontus-web:latest
|
||||
restart: always
|
||||
ports:
|
||||
- "2280:80"
|
||||
volumes:
|
||||
- ./default.conf:/etc/nginx/conf.d/default.conf
|
||||
- ./src:/usr/share/nginx/html
|
57
self
Executable file
57
self
Executable file
@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
|
||||
SC_VERSION=1.0.0
|
||||
SC_CODENAME="portal"
|
||||
COLOR_RESET="\033[0m"
|
||||
COLOR_GREEN="\033[1;32m"
|
||||
COLOR_RED="\033[1;31m"
|
||||
COLOR_YELLOW="\033[1;33m"
|
||||
COLOR_BLUE="\033[1;34m"
|
||||
COLOR_CYAN="\033[1;36m"
|
||||
|
||||
function start() {
|
||||
if [ ! -d "src" ]; then
|
||||
echo -e "${COLOR_RED}src directory not found, cannot continue${COLOR_RESET}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p public
|
||||
|
||||
cp -r src/* public/
|
||||
echo -e "${COLOR_GREEN}Created public dir and copied files successfully${COLOR_RESET}"
|
||||
}
|
||||
|
||||
function stop() {
|
||||
if [ -d "public" ]; then
|
||||
rm -rf public
|
||||
echo -e "${COLOR_GREEN}Deleted public directory${COLOR_RESET}"
|
||||
else
|
||||
echo -e "${COLOR_RED}No public directory to delete${COLOR_RESET}"
|
||||
fi
|
||||
}
|
||||
|
||||
function help() {
|
||||
echo -e "${COLOR_GREEN}self version:${COLOR_RESET} ${COLOR_BLUE}${SC_VERSION} ${SC_CODENAME}${COLOR_RESET}"
|
||||
echo -e "${COLOR_BLUE}Usage:${COLOR_RESET} ./self [command]\n"
|
||||
echo -e "${COLOR_YELLOW}Commands:${COLOR_RESET}"
|
||||
echo -e " ${COLOR_CYAN}help${COLOR_RESET} Shows this help message."
|
||||
echo -e " ${COLOR_CYAN}start${COLOR_RESET} Copies files to public directory."
|
||||
echo -e " ${COLOR_CYAN}stop${COLOR_RESET} Removes public directory."
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
help)
|
||||
help
|
||||
;;
|
||||
*)
|
||||
echo -e "${COLOR_RED}Invalid command: $1\n${COLOR_RESET}"
|
||||
help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>pontus</title>
|
||||
<link rel="stylesheet" href="css/main.min.css">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<!-- YOU CARE ABOUT MY CODE?! -->
|
||||
@ -13,7 +13,7 @@
|
||||
<div class="sb-itm">
|
||||
<h1 style="font-size: medium;">menu</h1>
|
||||
<b>home</b>
|
||||
<a href="/links">links</a>
|
||||
<a href="/links.html">links</a>
|
||||
</div>
|
||||
<div class="sb-itm">
|
||||
<h1 style="font-size: medium;">archives</h1>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>pontus</title>
|
||||
<link rel="stylesheet" href="css/main.min.css">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<!-- YOU CARE ABOUT MY CODE?! -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user