Compare commits
3 Commits
preview
...
7d7b1aa627
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d7b1aa627 | |||
| e170345fdd | |||
| 44bf161765 |
@@ -24,7 +24,7 @@ jobs:
|
|||||||
docker_folder_changed: ${{ steps.docker_folder.outputs.changed }}
|
docker_folder_changed: ${{ steps.docker_folder.outputs.changed }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
run: git clone --branch ${{ gitea.ref_name }} https://${{ secrets.REPO_TOKEN }}@git.vezpi.com/Vezpi/blog.git .
|
run: git clone --branch preview https://${{ secrets.REPO_TOKEN }}@git.vezpi.com/Vezpi/blog.git .
|
||||||
|
|
||||||
- name: Check Latest Hugo Version
|
- name: Check Latest Hugo Version
|
||||||
id: get_latest
|
id: get_latest
|
||||||
@@ -79,7 +79,7 @@ jobs:
|
|||||||
shell: sh
|
shell: sh
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
run: git clone --branch ${{ gitea.ref_name }} https://${{ secrets.REPO_TOKEN }}@git.vezpi.com/Vezpi/blog.git .
|
run: git clone --branch preview https://${{ secrets.REPO_TOKEN }}@git.vezpi.com/Vezpi/blog.git .
|
||||||
|
|
||||||
- name: Build Docker Image
|
- name: Build Docker Image
|
||||||
run: |
|
run: |
|
||||||
@@ -116,7 +116,7 @@ jobs:
|
|||||||
needs: Deploy-Staging
|
needs: Deploy-Staging
|
||||||
runs-on: ubuntu
|
runs-on: ubuntu
|
||||||
env:
|
env:
|
||||||
URL: "https://blog-staging.vezpi.com/en/"
|
URL: "https://blog-dev.vezpi.com/en/"
|
||||||
steps:
|
steps:
|
||||||
- name: Check HTTP Response
|
- name: Check HTTP Response
|
||||||
run: |
|
run: |
|
||||||
@@ -143,7 +143,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Merge preview Branch on main
|
- name: Merge preview Branch on main
|
||||||
run: |
|
run: |
|
||||||
git merge --ff-only origin/${{ gitea.ref_name }}
|
git merge --ff-only origin/preview
|
||||||
git push origin main
|
git push origin main
|
||||||
|
|
||||||
Deploy-Production:
|
Deploy-Production:
|
||||||
@@ -194,7 +194,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Remove Old Docker Image
|
- name: Remove Old Docker Image
|
||||||
run: |
|
run: |
|
||||||
docker image rm $(docker image ls ${DOCKER_IMAGE} 2> /dev/null | awk '$NF != "U" && NR>1 {print $2}')
|
docker image rm ${{ needs.Check-Rebuild.outputs.current_docker_image }} --force
|
||||||
|
|
||||||
Notify:
|
Notify:
|
||||||
needs: [Check-Rebuild, Build, Deploy-Staging, Test-Staging, Merge, Deploy-Production, Test-Production, Clean]
|
needs: [Check-Rebuild, Build, Deploy-Staging, Test-Staging, Merge, Deploy-Production, Test-Production, Clean]
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ jobs:
|
|||||||
--build-arg HUGO_VERSION=${{ needs.Check-Rebuild.outputs.latest_hugo_version }} \
|
--build-arg HUGO_VERSION=${{ needs.Check-Rebuild.outputs.latest_hugo_version }} \
|
||||||
--tag ${DOCKER_IMAGE}:${{ needs.Check-Rebuild.outputs.latest_hugo_version }} \
|
--tag ${DOCKER_IMAGE}:${{ needs.Check-Rebuild.outputs.latest_hugo_version }} \
|
||||||
.
|
.
|
||||||
docker tag ${DOCKER_IMAGE}:${{ needs.Check-Rebuild.outputs.latest_hugo_version }} ${DOCKER_IMAGE}:dev
|
docker tag ${DOCKER_IMAGE}:${{ needs.Check-Rebuild.outputs.latest_hugo_version }} ${DOCKER_IMAGE}:test
|
||||||
|
|
||||||
Deploy-Test:
|
Deploy-Test:
|
||||||
needs:
|
needs:
|
||||||
@@ -102,7 +102,7 @@ jobs:
|
|||||||
run:
|
run:
|
||||||
shell: sh
|
shell: sh
|
||||||
env:
|
env:
|
||||||
CONTAINER_NAME: blog_dev
|
CONTAINER_NAME: blog_test
|
||||||
steps:
|
steps:
|
||||||
- name: Launch Blog Test Deployment
|
- name: Launch Blog Test Deployment
|
||||||
run: |
|
run: |
|
||||||
@@ -117,7 +117,7 @@ jobs:
|
|||||||
needs: Deploy-Test
|
needs: Deploy-Test
|
||||||
runs-on: ubuntu
|
runs-on: ubuntu
|
||||||
env:
|
env:
|
||||||
URL: "https://blog-dev.vezpi.com/en/"
|
URL: "https://blog-test.vezpi.com/en/"
|
||||||
steps:
|
steps:
|
||||||
- name: Check HTTP Response
|
- name: Check HTTP Response
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -3,15 +3,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.lang-toggle-icon {
|
.lang-toggle-icon {
|
||||||
margin-left: 0;
|
margin-left: auto;
|
||||||
svg {
|
svg {
|
||||||
width: 64px;
|
width: 64px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
.left-sidebar {
|
|
||||||
width: unset;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -21,9 +21,6 @@ rm -rf "$CLONE_DIR"
|
|||||||
echo "- Cloning $REPO_URL (branch: $BRANCH)..."
|
echo "- Cloning $REPO_URL (branch: $BRANCH)..."
|
||||||
git clone --recurse-submodules --branch "$BRANCH" "$REPO_URL" "$CLONE_DIR"
|
git clone --recurse-submodules --branch "$BRANCH" "$REPO_URL" "$CLONE_DIR"
|
||||||
|
|
||||||
# Patch .Site.Data references not yet fixed in Stack theme
|
|
||||||
sed -i 's/\.Site\.Data/hugo.Data/g' "$CLONE_DIR/themes/stack/layouts/_partials/article/components/photoswipe.html"
|
|
||||||
|
|
||||||
# Generate static files with hugo
|
# Generate static files with hugo
|
||||||
echo "- Building site with Hugo v$HUGO_VERSION in $HUGO_DEST..."
|
echo "- Building site with Hugo v$HUGO_VERSION in $HUGO_DEST..."
|
||||||
hugo --source "$CLONE_DIR" --destination "$HUGO_DEST" --baseURL="https://${URL}" ${DRAFTS} --logLevel info --cleanDestinationDir --gc --panicOnWarning --printI18nWarnings
|
hugo --source "$CLONE_DIR" --destination "$HUGO_DEST" --baseURL="https://${URL}" ${DRAFTS} --logLevel info --cleanDestinationDir --gc --panicOnWarning --printI18nWarnings
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
{{- $IsList := .IsList -}}
|
|
||||||
{{- $Page := .Page -}}
|
|
||||||
<div class="article-details">
|
<div class="article-details">
|
||||||
{{ if $Page.Params.categories }}
|
{{ if .Params.categories }}
|
||||||
<header class="article-category">
|
<header class="article-category">
|
||||||
{{ range ($Page.GetTerms "tags") }}
|
{{ range (.GetTerms "tags") }}
|
||||||
{{ $color := partial "helper/color-from-str" .LinkTitle }}
|
<a href="{{ .RelPermalink }}" {{ with .Params.style }}style="background-color: {{ .background }}; color: {{ .color }};"{{ end }}>
|
||||||
{{ $BackgroundColor := default $color.BackgroundColor .Params.style.background }}
|
|
||||||
{{ $TextColor := default $color.TextColor .Params.style.color }}
|
|
||||||
<a href="{{ $Page.RelPermalink }}" style="background-color: {{ $BackgroundColor | safeCSS }}; color: {{ $TextColor | safeCSS }};">
|
|
||||||
{{ .LinkTitle }}
|
{{ .LinkTitle }}
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@@ -16,51 +11,50 @@
|
|||||||
|
|
||||||
<div class="article-title-wrapper">
|
<div class="article-title-wrapper">
|
||||||
<h2 class="article-title">
|
<h2 class="article-title">
|
||||||
<a href="{{ $Page.RelPermalink }}">
|
<a href="{{ .RelPermalink }}">
|
||||||
{{- $Page.Title -}}
|
{{- .Title -}}
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
{{ with $Page.Params.description }}
|
{{ with .Params.description }}
|
||||||
<h3 class="article-subtitle">
|
<h3 class="article-subtitle">
|
||||||
{{ . }}
|
{{ . }}
|
||||||
</h3>
|
</h3>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ $showReadingTime := $Page.Params.readingTime | default ($Page.Site.Params.article.readingTime) }}
|
{{ $showReadingTime := .Params.readingTime | default (.Site.Params.article.readingTime) }}
|
||||||
{{ $showDate := not $Page.Date.IsZero }}
|
{{ $showDate := not .Date.IsZero }}
|
||||||
{{ $showTime := or $showDate $showReadingTime }}
|
{{ $showFooter := or $showDate $showReadingTime }}
|
||||||
|
{{ if $showFooter }}
|
||||||
{{ if $showTime }}
|
<footer class="article-time">
|
||||||
<footer class="article-meta">
|
{{ if $showDate }}
|
||||||
<div class="inline-meta">
|
<div>
|
||||||
{{ if $showDate }}
|
|
||||||
{{ partial "helper/icon" "date" }}
|
{{ partial "helper/icon" "date" }}
|
||||||
<time class="article-time--published" datetime='{{ $Page.Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
<time class="article-time--published">
|
||||||
{{- $Page.Date | time.Format $Page.Site.Params.dateFormat.published -}}
|
{{- .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
||||||
</time>
|
</time>
|
||||||
{{ end }}
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ if $showReadingTime }}
|
{{ if $showReadingTime }}
|
||||||
{{ partial "helper/icon" "clock" }}
|
<div>
|
||||||
|
{{ partial "helper/icon" "stopwatch" }}
|
||||||
<time class="article-time--reading">
|
<time class="article-time--reading">
|
||||||
{{ T "article.readingTime" $Page.ReadingTime }}
|
{{ T "article.readingTime" .ReadingTime }}
|
||||||
</time>
|
</time>
|
||||||
{{ end }}
|
</div>
|
||||||
|
{{ end }}
|
||||||
{{- $date := $Page.Date.Format "20060102" | int -}}
|
{{- $date := .Date.Format "20060102" | int -}}
|
||||||
{{- $lastmod := $Page.Lastmod.Format "20060102" | int -}}
|
{{- $lastmod := .Lastmod.Format "20060102" | int -}}
|
||||||
{{- if gt $lastmod $date -}}
|
{{- if gt $lastmod $date -}}
|
||||||
<div class="article-lastmod">
|
<div class="article-lastmod">
|
||||||
{{ partial "helper/icon" "refresh" }}
|
{{ partial "helper/icon" "refresh" }}
|
||||||
<time>
|
<time>
|
||||||
{{ T "article.lastUpdatedOn" }} {{ $Page.Lastmod | time.Format ( or $Page.Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
|
{{ T "article.lastUpdatedOn" }} {{ .Lastmod | time.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }}
|
||||||
</time>
|
</time>
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</div>
|
|
||||||
|
|
||||||
</footer>
|
</footer>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Submodule themes/stack updated: 8e3687431f...70a1954b7e
Reference in New Issue
Block a user