refactor(site): extract CSS to assets/style.css and add deploy badge placeholder
This commit is contained in:
@@ -51,6 +51,18 @@ jobs:
|
||||
ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts 2>/dev/null
|
||||
chmod 600 ~/.ssh/known_hosts
|
||||
|
||||
- name: Inject deploy info
|
||||
run: |
|
||||
set -euo pipefail
|
||||
SHA_SHORT=$(echo "${GITHUB_SHA}" | cut -c1-7)
|
||||
DEPLOY_TS=$(date -u +"%Y-%m-%d %H:%M UTC")
|
||||
DEPLOY_INFO="${SHA_SHORT} · ${DEPLOY_TS}"
|
||||
# In-place substitute the <!--DEPLOY_INFO--> placeholder in all HTML files.
|
||||
# Pipe `|` is used as the sed delimiter to avoid clashing with `/` in the timestamp.
|
||||
# GNU sed on the Ubuntu runner accepts `-i` without a backup arg.
|
||||
find site -name "*.html" -exec sed -i "s|<!--DEPLOY_INFO-->|${DEPLOY_INFO}|g" {} +
|
||||
echo "Injected deploy info: ${DEPLOY_INFO}"
|
||||
|
||||
- name: Rsync site/ to IONOS DocumentRoot
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
Reference in New Issue
Block a user