From 5e2291d61f4ee6812432609042d8f62a3baeb144 Mon Sep 17 00:00:00 2001 From: cowuake Date: Wed, 1 May 2024 17:56:05 +0200 Subject: [PATCH] Add publication time to web page --- .github/workflows/ci.yml | 2 ++ .github/workflows/publish-web.yml | 5 ++++- schemius-web/schemius.js | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a74be43..edf8cba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,8 @@ on: - 'schemius-native/**' - 'schemius-web/src/**' - 'schemius-web/Cargo.toml' + paths-ignore: + - '.github/workflows/*-web.yml' jobs: build-and-test: diff --git a/.github/workflows/publish-web.yml b/.github/workflows/publish-web.yml index b9d18d1..e1122cd 100644 --- a/.github/workflows/publish-web.yml +++ b/.github/workflows/publish-web.yml @@ -48,7 +48,10 @@ jobs: working-directory: ${{ env.WORK_DIR }} - name: Generate final web page - run: cp $WEB_PAGE_SOURCE $WEB_PAGE + run: | + cp $WEB_PAGE_SOURCE $WEB_PAGE + sed -i "s/DATETIME_PLACEHOLDER/$(date -u '+Published %F %H:%M:%S UTC')/g" ${{ env.WORK_DIR }}/${{ env.WEB_PAGE_JS }} + working-directory: ${{ env.WORK_DIR }} - name: Upload artifacts diff --git a/schemius-web/schemius.js b/schemius-web/schemius.js index 55ed14f..d5d88fd 100644 --- a/schemius-web/schemius.js +++ b/schemius-web/schemius.js @@ -19,7 +19,7 @@ class Schemius { ███████║╚██████╗██║ ██║███████╗██║ ╚═╝ ██║██║╚██████╔╝███████║ ╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚══════╝ - Welcome to Schemius! + Welcome to Schemius! [DATETIME_PLACEHOLDER] Press [Ctrl + H] to show this welcome message Press [Ctrl + K] to show essential keymap (environment-bindings) -> Show bindings in current env