Skip to content

Commit 2288319

Browse files
committed
init push
1 parent 245f3e8 commit 2288319

File tree

413 files changed

+17315
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

413 files changed

+17315
-0
lines changed

.github/workflows/deploy-2-page.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI - build and test on gh-pages
2+
3+
# 在 push 时触发
4+
on:
5+
push:
6+
branches:
7+
- '*'
8+
- '!gh-pages'
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Cache Hugo resources
17+
uses: actions/cache@v2
18+
env:
19+
cache-name: cache-hugo-resources
20+
with:
21+
path: resources
22+
key: ${{ env.cache-name }}
23+
24+
- uses: actions/setup-go@v2
25+
with:
26+
go-version: "^1.19.1" # 设定 Go 的版本
27+
- run: go version
28+
29+
- name: Cache Go Modules # 当前的模板依赖于这样的更新方式
30+
uses: actions/cache@v2
31+
with:
32+
path: |
33+
~/.cache/go-build
34+
~/go/pkg/mod
35+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
36+
restore-keys: |
37+
${{ runner.os }}-go-
38+
39+
- name: Setup Hugo ✨ # 使用最新版本的扩展版 Hugo 构建
40+
uses: peaceiris/actions-hugo@v2
41+
with:
42+
hugo-version: "latest"
43+
extended: true
44+
45+
- name: Hugo Build 🛠️
46+
run: hugo --minify --gc
47+
48+
- name: Deploy to gh-pages 🚀 # gh-pages 用于测试目的,同时也是 staging 环境
49+
uses: JamesIves/github-pages-deploy-action@4.1.4
50+
with:
51+
branch: gh-pages
52+
folder: public
53+
clean: true
54+
single-commit: true

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
public/
2+
resources/
3+
.DS_Store

archetypes/default.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: "{{ replace .Name "-" " " | title }}"
3+
date: {{ .Date }}
4+
draft: true
5+
---
6+

0 commit comments

Comments
 (0)