change hugo config

This commit is contained in:
YDZ
2020-01-29 20:08:07 +08:00
parent 0a76d34f11
commit 2369f806e3
465 changed files with 10461 additions and 16157 deletions

View File

@@ -1,4 +1,4 @@
name: Deploy site files
name: Deploy leetcode-cookbook
on:
push:
@@ -16,13 +16,23 @@ jobs:
steps: # 自动化步骤
- uses: actions/checkout@v2 # 第一步,下载代码仓库
- name: Deploy to Server # 第二步,rsync推文件
- name: Setup Hugo # 第二步,安装 hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.74.3'
- name: Build # 第三步,编译 hugo
script: |
cd ./website
hugo -D --minify
- name: Deploy to Server # 第四步rsync推文件
uses: AEnterprise/rsync-deploy@v1.0 # 使用别人包装好的步骤镜像
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} # 引用配置SSH私钥
ARGS: -avz --delete --exclude='*.pyc' # rsync参数排除.pyc文件
SERVER_PORT: '22' # SSH端口
FOLDER: ./website/* #推送的文件夹,路径相对于代码仓库的根目录
FOLDER: ./website/public/* #推送的文件夹,路径相对于代码仓库的根目录
SERVER_IP: ${{ secrets.SSH_HOST }} # 引用配置服务器的host名IP或者域名domain.com
USERNAME: ${{ secrets.SSH_USERNAME }} # 引用配置,服务器登录名
SERVER_DESTINATION: /var/www/books/leetcode/ # 部署到目标文件夹