-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
68ef6be
commit bd85983
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # Set a branch to deploy | ||
pull_request: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-22.04 | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true # Fetch Hugo themes (true OR recursive) | ||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | ||
|
||
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v3 | ||
with: | ||
hugo-version: '0.138.0' # 注意修改成你的hugo版本,以防兼容性错误 | ||
extended: true # 是否启用hugo extended | ||
|
||
- name: Build | ||
run: hugo --minify | ||
working-directory: ./Ilichi-Blog # 注意修改成你使用hugo创建的项目名称 | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: github.ref == 'refs/heads/main' | ||
with: | ||
PERSONAL_TOKEN: ${{ secrets.ACTION_TOKEN }} | ||
PUBLISH_DIR: ./Ilichi-Blog/public # 注意修改成你使用hugo创建的项目名称 | ||
EXTERNAL_REPOSITORY: IlichiNiKoka/IlichiNiKoka.github.io # 你的Github Pages远程仓库名 | ||
PUBLISH_BRANCH: main # 如果不想推送到gh-pages分支,可以添加这一行 |