Skip to content

Commit 2369f80

Browse files
committed
change hugo config
1 parent 0a76d34 commit 2369f80

File tree

465 files changed

+10461
-16157
lines changed

Some content is hidden

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

465 files changed

+10461
-16157
lines changed

.github/workflows/deploy.yml

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy site files
1+
name: Deploy leetcode-cookbook
22

33
on:
44
push:
@@ -16,13 +16,23 @@ jobs:
1616
steps: # 自动化步骤
1717
- uses: actions/checkout@v2 # 第一步,下载代码仓库
1818

19-
- name: Deploy to Server # 第二步,rsync推文件
19+
- name: Setup Hugo # 第二步,安装 hugo
20+
uses: peaceiris/actions-hugo@v2
21+
with:
22+
hugo-version: '0.74.3'
23+
24+
- name: Build # 第三步,编译 hugo
25+
script: |
26+
cd ./website
27+
hugo -D --minify
28+
29+
- name: Deploy to Server # 第四步,rsync推文件
2030
uses: AEnterprise/[email protected] # 使用别人包装好的步骤镜像
2131
env:
2232
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} # 引用配置,SSH私钥
2333
ARGS: -avz --delete --exclude='*.pyc' # rsync参数,排除.pyc文件
2434
SERVER_PORT: '22' # SSH端口
25-
FOLDER: ./website/* #推送的文件夹,路径相对于代码仓库的根目录
35+
FOLDER: ./website/public/* #推送的文件夹,路径相对于代码仓库的根目录
2636
SERVER_IP: ${{ secrets.SSH_HOST }} # 引用配置,服务器的host名(IP或者域名domain.com)
2737
USERNAME: ${{ secrets.SSH_USERNAME }} # 引用配置,服务器登录名
2838
SERVER_DESTINATION: /var/www/books/leetcode/ # 部署到目标文件夹

website/404.html

-52
This file was deleted.

website/archetypes/default.md

+6
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)