Skip to content

Commit

Permalink
update language & workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzhizhia committed Jan 6, 2025
1 parent 51485b0 commit 50ccd6b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/deploy-public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,21 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '${{ env.HUGO_VERSION }}'
extended: true
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${{ env.HUGO_VERSION }}/hugo_extended_${{ env.HUGO_VERSION }}_linux-amd64.deb
sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Build
run: hugo --minify --gc

- name: Deploy to public branch
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: public
FOLDER: public
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESSAGE: "Build: ({sha}) {msg}"
SQUASH_HISTORY: true
run: |
cd public
git init
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add -A
git commit -m "Build: (${{ github.sha }}) ${{ github.event.head_commit.message }}"
git push --force https://${{ github.token }}@github.com/${{ github.repository }}.git HEAD:public
2 changes: 1 addition & 1 deletion content/zh/archive.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "归档"
layout: "archives"
url: "/zh-cn/archives"
url: "/zh/archives"
summary: "archives"
---
File renamed without changes.

0 comments on commit 50ccd6b

Please sign in to comment.