Compare commits

..

No commits in common. "646fad197e1fd09b608b36bca5184e4e00cc69bc" and "b688ab495fded7ab907cd5a356398839c3570fd3" have entirely different histories.

7 changed files with 15 additions and 54 deletions

View file

@ -3,30 +3,11 @@ name: Build and Deploy Website
on: [push] on: [push]
jobs: jobs:
build-dev:
name: Build Dev Website
runs-on: docker
container:
image: node:lts
if: github.ref != 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: npm install
- name: Build English Version
run: npm run build:dev
- name: Build German Version
run: npm run build:dev:de
- uses: actions/upload-artifact@v3
with:
name: build
path: dist/
build: build:
name: Build Website name: Build Website
runs-on: docker runs-on: docker
container: container:
image: node:lts image: node:lts
if: github.ref == 'refs/heads/main'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install Dependencies - name: Install Dependencies
@ -44,7 +25,7 @@ jobs:
runs-on: docker runs-on: docker
container: container:
image: node:lts-alpine image: node:lts-alpine
needs: [build-dev] needs: [build]
if: github.ref == 'refs/heads/develop' if: github.ref == 'refs/heads/develop'
steps: steps:
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3

View file

@ -1,3 +1,5 @@
[![Build Status](https://ci.sp-codes.de/api/badges/samuel-p/samuel-philipp.de/status.svg)](https://ci.sp-codes.de/samuel-p/samuel-philipp.de)
# samuel-philipp.de # samuel-philipp.de
Website for [samuel-philipp.de](https://samuel-philipp.de) and [samuel-philipp.com](https://samuel-philipp.com) Website for [samuel-philipp.de](https://samuel-philipp.de) and [samuel-philipp.com](https://samuel-philipp.com)

View file

@ -8,9 +8,7 @@
"start": "eleventy --serve --watch", "start": "eleventy --serve --watch",
"start:de": "LANGUAGE=de eleventy --serve --watch", "start:de": "LANGUAGE=de eleventy --serve --watch",
"build": "eleventy && npm run minify-css", "build": "eleventy && npm run minify-css",
"build:de": "LANGUAGE=de eleventy && npm run minify-css", "build:de": "LANGUAGE=de eleventy && npm run minify-css"
"build:dev": "BUILD=dev eleventy && npm run minify-css",
"build:dev:de": "BUILD=dev LANGUAGE=de eleventy && npm run minify-css"
}, },
"author": "samuel-p", "author": "samuel-p",
"repository": { "repository": {
@ -27,6 +25,7 @@
"@node-minify/crass": "^8.0.6", "@node-minify/crass": "^8.0.6",
"@node-minify/html-minifier": "^8.0.6", "@node-minify/html-minifier": "^8.0.6",
"@sardine/eleventy-plugin-tinyhtml": "^0.2.0", "@sardine/eleventy-plugin-tinyhtml": "^0.2.0",
"cpx": "^1.5.0",
"eleventy-plugin-rev": "^2.0.0", "eleventy-plugin-rev": "^2.0.0",
"eleventy-sass": "^2.2.4", "eleventy-sass": "^2.2.4",
"glob": "^10.3.12", "glob": "^10.3.12",

View file

@ -1,16 +0,0 @@
{
"languages": [
{
"label": "Deutsch",
"code": "de",
"icon": "de",
"url": "https://dev.samuel-philipp.de"
},
{
"label": "English",
"code": "en",
"icon": "us",
"url": "https://dev.samuel-philipp.com"
}
]
}

View file

@ -4,17 +4,17 @@
"description": "Samuel Philipp - Full-Stack Developer / SysAdmin / Magician", "description": "Samuel Philipp - Full-Stack Developer / SysAdmin / Magician",
"author": "Samuel Philipp", "author": "Samuel Philipp",
"languages": [ "languages": [
{
"label": "Deutsch",
"code": "de",
"icon": "de",
"url": "https://samuel-philipp.de"
},
{ {
"label": "English", "label": "English",
"code": "en", "code": "en",
"icon": "us", "icon": "us",
"url": "https://samuel-philipp.com" "url": "https://samuel-philipp.com"
},
{
"label": "Deutsch",
"code": "de",
"icon": "de",
"url": "https://samuel-philipp.de"
} }
], ],
"menu": { "menu": {

View file

@ -1,11 +1,6 @@
const fs = require("fs");
const site = require("./global.json"); const site = require("./global.json");
site.buildName = process.env.BUILD || 'prod'; site.buildTime = new Date();
if (fs.existsSync(`${__dirname}/global.${site.buildName}.json`)) {
Object.assign(site, require(`./global.${site.buildName}.json`));
}
site.buildTime = new Date().toISOString();
site.lang = process.env.LANGUAGE || 'en'; site.lang = process.env.LANGUAGE || 'en';
site.language = site.languages.find(l => l.code === site.lang); site.language = site.languages.find(l => l.code === site.lang);
site.strings = require(`./i18n/${site.lang}.json`); site.strings = require(`./i18n/${site.lang}.json`);

View file

@ -79,10 +79,10 @@ title: {{site.title}}
class="i-stackoverflow i-2x i-fw"></i></a></li> class="i-stackoverflow i-2x i-fw"></i></a></li>
</ul> </ul>
<ul class="social-icons"> <ul class="social-icons">
{%- for language in site.languages %} <li class="m-2"><a href="https://samuel-philipp.de"><span class="fi fi-de i-2x"></span></a>
<li class="m-2"><a href="{{language.url}}"><span class="fi fi-{{language.icon}} i-2x"></span></a> </li>
<li class="m-2"><a href="https://samuel-philipp.com"><span class="fi fi-us i-2x"></span></a>
</li> </li>
{%- endfor %}
</ul> </ul>
</div> </div>
<div class="scroll-down-outer"> <div class="scroll-down-outer">