Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
reearth-app[bot] committed Nov 1, 2024
2 parents ab9417c + da55331 commit 7efe2f9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
id: info
# The tag name should be retrieved lazily, as tagging may be delayed.
env:
BRANCH: ${{ github.event.workflow_run.head_branch }}
BRANCH: ${{ github.head_ref || github.ref_name }}
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
if [[ "$BRANCH" = "release" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
id: info
# The tag name should be retrieved lazily, as tagging may be delayed.
env:
BRANCH: ${{ github.event.workflow_run.head_branch }}
BRANCH: ${{ github.head_ref || github.ref_name }}
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
if [[ "$BRANCH" = "release" ]]; then
Expand Down
14 changes: 14 additions & 0 deletions web/docker/40-envsubst-on-reearth-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,17 @@ wrap_reearth_cms_variables() {

wrap_reearth_cms_variables $@
envsubst < "$_REEARTH_CONFIG_TEMPLATE_FILE" > "$_REEARTH_CONFIG_OUTPUT_FILE"

# rewrite index.html to change title and favicon
_REEARTH_HTML_FILE="/usr/share/nginx/html/index.html"

# Rewrite title tag in index.html only if REEARTH_CMS_TITLE is set
if [ -n "$REEARTH_CMS_TITLE" ]; then
sed -i '' -e "s|<title>.*</title>|<title>${REEARTH_CMS_TITLE}</title>|g" "$_REEARTH_HTML_FILE"
fi

# Rewrite favicon in index.html only if REEARTH_CMS_FAVICON is set
#
if [ -n "$REEARTH_CMS_FAVICON" ]; then
sed -i '' -e "s|<link rel=\"icon\" href=\"[^\"]*\" type=\"image/x-icon\" />|<link rel=\"icon\" href=\"${REEARTH_CMS_FAVICON}\" type=\"image/x-icon\" />|g" "$_REEARTH_HTML_FILE"
fi

0 comments on commit 7efe2f9

Please sign in to comment.