diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml index b73d8ed..d254148 100644 --- a/.gitea/workflows/publish.yaml +++ b/.gitea/workflows/publish.yaml @@ -26,6 +26,12 @@ jobs: - name: Build run: hugo --minify + - name: Replace [commit] with short commit hash and hyperlink + run: | + SHORT_COMMIT=$(git rev-parse --short HEAD) + COMMIT_URL="https://git.ericxliu.me/eric/ericxliu-me/commit/$SHORT_COMMIT" + find ./public -type f -exec sed -i "s|\[commit\]|$SHORT_COMMIT|g" {} + + - name: Deploy uses: peaceiris/actions-gh-pages@v4 with: