commit c0ff390c1955efff164b48b04954dc011532fafa Author: Stephan Hadan Date: Sun Jan 5 21:09:10 2025 +0100 first commit diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..238b9fd --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,40 @@ +name: Build,test and deploy iamstephan.info +run-name: ${{ gitea.actor }} is building, testing and deploying the static page +on: + push: + branches: + - prod + +jobs: + deploy-prod: + runs-on: ubuntu-latest + steps: + - run: echo "The job was automatically triggered by a ${{ gitea.event_name }} event." + - run: echo "The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + with: + submodules: 'true' + github-server-url: 'https:/github.com/' + - name: Install apt packages + run: apt update && apt install -y jq rsync + - name: Get latest Hugo version + run: | + url=$(curl --silent "https://api.github.com/repos/gohugoio/hugo/releases/latest" | jq -r '.assets[] | select(.name | contains("linux-amd64.tar.gz")) | .browser_download_url' | grep -E 'hugo_[0-9]+\.[0-9]+\.[0-9]+_linux-amd64.tar.gz') + wget -P /tmp/hugo/ "$url" + version=$(echo "$url" | grep -oP 'hugo_\K[0-9]+\.[0-9]+\.[0-9]+') + echo "Downloaded Hugo version: $version" + - name: Unpack Hugo + run: tar -xf /tmp/hugo/* -C ${{ gitea.workspace }}/bin + - name: Build the static webpage + run: ${{ gitea.workspace }}/bin/hugo --minify + - name: Test static page + run: bash ${{ gitea.workspace }}/bin/test_static_page.sh + - name: Create private key + run: | + echo "${{ secrets.ACT_RUNNER_KEY }}" > /tmp/act_runner_key + chmod 600 /tmp/act_runner_key + - name: rsync public directory + run: | + /usr/bin/rsync -avz --delete -e "ssh -i /tmp/act_runner_key -o StrictHostKeyChecking=no" ${{ gitea.workspace }}/public/* root@vps03.hadan-it.com:/opt/npm/webspace/iamstephan.info/ + - run: echo "This job's status is ${{ job.status }}." diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..4b10932 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/hugo-goa"] + path = themes/hugo-goa + url = https://github.com/shenoydotme/hugo-goa.git diff --git a/.hugo_build.lock b/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..25b6752 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +date = '{{ .Date }}' +draft = true +title = '{{ replace .File.ContentBaseName "-" " " | title }}' ++++ diff --git a/bin/test_static_page.sh b/bin/test_static_page.sh new file mode 100755 index 0000000..99bdb97 --- /dev/null +++ b/bin/test_static_page.sh @@ -0,0 +1,26 @@ +#!/bin/bash +PORT=8080 +python3 -m http.server $PORT --directory public/ & + +SERVER_PID=$! + +# Give it a moment to start +sleep 2 + +# Check if the server is running +if ! ps -p $SERVER_PID > /dev/null; then + echo "HTTP server failed to start." + exit 1 +fi + +# Check HTTP status +status_code=$(curl -o /dev/null -s -w "%{http_code}" http://localhost:$PORT) + +# Kill the http server +kill $SERVER_PID + +# Check if status code is 200 +if [ "$status_code" -ne 200 ]; then + echo "Website returned a non-200 status code: $status_code" + exit 1 +fi diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..644d431 --- /dev/null +++ b/hugo.toml @@ -0,0 +1,4 @@ +baseURL = 'https://iamstephan.info/' +languageCode = 'en-us' +title = 'Hi, I am Stephan' +theme = 'hugo-goa' diff --git a/public/404.html b/public/404.html new file mode 100644 index 0000000..36df564 --- /dev/null +++ b/public/404.html @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + My New Hugo Site - 404 Page not found + + + + + + + + + + + + + + + + + + + +
+ +
+

404

+

Sorry! That page does not exist. It may have been removed or moved to a new section on the site. Click here go back to the home page.

+
+ +
+
+ + +
+
+ + + + + + + + + diff --git a/public/android-chrome-192x192.png b/public/android-chrome-192x192.png new file mode 100644 index 0000000..cd5a02a Binary files /dev/null and b/public/android-chrome-192x192.png differ diff --git a/public/android-chrome-512x512.png b/public/android-chrome-512x512.png new file mode 100644 index 0000000..7583343 Binary files /dev/null and b/public/android-chrome-512x512.png differ diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png new file mode 100644 index 0000000..9a7c2e5 Binary files /dev/null and b/public/apple-touch-icon.png differ diff --git a/public/categories/index.html b/public/categories/index.html new file mode 100644 index 0000000..273f6cd --- /dev/null +++ b/public/categories/index.html @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + My New Hugo Site - Categories + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
    + +
+
+ + + +
+
+ + +
+
+ + + + + + + + + diff --git a/public/categories/index.xml b/public/categories/index.xml new file mode 100644 index 0000000..216aed4 --- /dev/null +++ b/public/categories/index.xml @@ -0,0 +1,11 @@ + + + + Categories on My New Hugo Site + http://localhost:1313/categories/ + Recent content in Categories on My New Hugo Site + Hugo + en-us + + + diff --git a/public/css/custom.css b/public/css/custom.css new file mode 100644 index 0000000..4f174c1 --- /dev/null +++ b/public/css/custom.css @@ -0,0 +1 @@ +/* Add custom CSS here. */ diff --git a/public/css/main.css b/public/css/main.css new file mode 100644 index 0000000..91c37d1 --- /dev/null +++ b/public/css/main.css @@ -0,0 +1,229 @@ +@-ms-viewport { + width: device-width; +} +@-o-viewport { + width: device-width; +} +@viewport { + width: device-width; +} +a, +a:hover, +a:visited, +a:link { + text-decoration: none; + color: rgb(24 24 27); +} +body { + font-family: "Roboto Slab", "Roboto", "Lato", sans-serif; + font-size: 20px; + font-weight: 400; + + width: auto; + height: 100%; + min-height: 100%; + margin: 0; + + background-color: #fcfcfc; +} +html { + position: relative; + + height: 100%; + min-height: 100%; + margin: 0; +} +li { + text-align: left; +} +.author { + color: #444; +} +.author h1, +.author h2, +.author h3, +.author h4, +.author h5, +.author h6, +.author p { + font-family: "Roboto Slab", serif; +} +.category { + color: #966 !important; +} +.container { + overflow: auto; + max-width: 800px; + padding: 0 15px; +} +.content { + margin-top: 20px; + margin-bottom: 20px; +} +.content a { + text-decoration: none; + color: rgb(153 27 27); +} +div.content { + font-family: "Roboto", sans-serif; + font-size: 18px; + font-weight: 300; + + color: #777; +} +.copyright { + font-family: "Roboto", sans-serif; + font-size: 12px; + font-weight: 200; +} +.description { + font-family: "Roboto", sans-serif; + font-weight: 200; + color: rgb(161 161 170); + font-size: 16px; +} +.error { + font-family: "Roboto", sans-serif; + font-weight: 300; + margin-top: 100px; +} +.error a { + color: rgb(153 27 27); +} +.error h1 { + font-size: 80px; + + color: #8b8b8b; +} +.error p { + margin-top: 150px; + + color: #777; +} +.excerpt { + font-family: "Lato", sans-serif; + font-size: 18px; + font-weight: 200; + + color: #555; + margin-bottom: 20px; +} +.footer { + margin-top: 10px; + + color: #8b8b8b; +} +.header { + margin-top: 60px; + margin-bottom: 20px; +} +.headshot { + width: 180px; + height: 180px; + object-fit: cover; +} +.info { + margin-top: 10px; + margin-bottom: 20px; +} +.intro { + font-family: "Roboto Slab", serif; + font-weight: 300; + font-size: 20px; + color: rgb(82 82 91); +} +h3.intro { + margin-top: 0px; +} +.list { + font-family: "Roboto", sans-serif; + + margin-top: 50px; +} +.list li { + list-style: none; +} +.list-entry { + font-family: "Roboto Slab", serif; + font-size: 25px; + font-weight: 400; + + margin-top: 10px; + margin-bottom: 20px; +} +.list-entry-link { + padding: 0; +} +.main-menu { + margin-top: 10px; + margin-bottom: 20px; +} +.menu { + margin-top: 10px; + margin-bottom: 20px; +} +.menu-item { + font-family: "Lato", sans-serif; + font-size: 20px; + font-weight: 300; + + text-decoration: none; + + color: rgb(153 27 27) !important; +} +.meta { + font-family: "Roboto", sans-serif; + font-size: 12px; + font-weight: 200; + color: rgb(113 113 122); +} +a.meta { + color: rgb(153 27 27); +} +h6.meta { + font-family: "Roboto", sans-serif; + font-size: 12px; + font-weight: 200; + color: rgb(113 113 122); +} +section.meta { + margin-top: ; +} +.powered { + font-family: "Roboto", sans-serif; + font-size: 12px; + font-weight: 300; +} +.social { + margin: 20px 10px; +} +.social a { + color: #526d7a; + margin: 5px; +} +.title { + font-family: "Roboto Slab", serif; + font-weight: 400; + + rgb(24 24 27); +} +header.title { + margin-top: 50px; + padding: 0px; +} +@media (max-width: 991px) { + .header { + margin-top: 50px; + margin-bottom: 20px; + } + .list { + font-family: "Roboto", sans-serif; + + margin-top: 30px; + } +} +pre > code { + white-space: pre; + word-wrap: initial; + word-break: initial; +} diff --git a/public/favicon-16x16.png b/public/favicon-16x16.png new file mode 100644 index 0000000..271f3bc Binary files /dev/null and b/public/favicon-16x16.png differ diff --git a/public/favicon-32x32.png b/public/favicon-32x32.png new file mode 100644 index 0000000..e24937b Binary files /dev/null and b/public/favicon-32x32.png differ diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..50b376a Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..271db2e --- /dev/null +++ b/public/index.html @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + My New Hugo Site + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +

+
+ +
+ + +
+ + + + + + + +
+
+ + +
+
+ + + + + + + + + diff --git a/public/index.xml b/public/index.xml new file mode 100644 index 0000000..7bc3bb1 --- /dev/null +++ b/public/index.xml @@ -0,0 +1,11 @@ + + + + My New Hugo Site + http://localhost:1313/ + Recent content on My New Hugo Site + Hugo + en-us + + + diff --git a/public/js/custom.js b/public/js/custom.js new file mode 100644 index 0000000..c0e86c3 --- /dev/null +++ b/public/js/custom.js @@ -0,0 +1 @@ +// Insert custom javascript here. diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..227b7ec --- /dev/null +++ b/public/manifest.json @@ -0,0 +1 @@ +{"name":"hugo-goa","short_name":"goa","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file diff --git a/public/site.webmanifest b/public/site.webmanifest new file mode 100644 index 0000000..3f061b5 --- /dev/null +++ b/public/site.webmanifest @@ -0,0 +1,19 @@ +{ + "name": "hugo-goa", + "short_name": "goa", + "icons": [ + { + "src": "/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} \ No newline at end of file diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 0000000..d98137c --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,11 @@ + + + + http://localhost:1313/categories/ + + http://localhost:1313/ + + http://localhost:1313/tags/ + + diff --git a/public/tags/index.html b/public/tags/index.html new file mode 100644 index 0000000..dfcd8e1 --- /dev/null +++ b/public/tags/index.html @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + My New Hugo Site - Tags + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
    + +
+
+ + + +
+
+ + +
+
+ + + + + + + + + diff --git a/public/tags/index.xml b/public/tags/index.xml new file mode 100644 index 0000000..257f943 --- /dev/null +++ b/public/tags/index.xml @@ -0,0 +1,11 @@ + + + + Tags on My New Hugo Site + http://localhost:1313/tags/ + Recent content in Tags on My New Hugo Site + Hugo + en-us + + + diff --git a/themes/hugo-goa b/themes/hugo-goa new file mode 160000 index 0000000..adbc3cb --- /dev/null +++ b/themes/hugo-goa @@ -0,0 +1 @@ +Subproject commit adbc3cba5130578c8500da640a05063d7a74215c