Update upy.yml

This commit is contained in:
小赵同学 authored and GitHub committed 2024-07-28 08:58:55 +08:00
1 parent af14ab7387
commit 9710bb74c3
1 file changed
+15 -9
+15 -9
View File
@@ -1,12 +1,9 @@
name: Sync Upyun name: Deploy to UpYun
on: on:
workflow_dispatch:
push: push:
branches: branches:
- master - main
paths:
- 'koobaiblog/**' # 目录内容有变化执行工作流
jobs: jobs:
build: build:
@@ -16,10 +13,19 @@ jobs:
- name: Checkout Repository master branch - name: Checkout Repository master branch
uses: actions/checkout@master uses: actions/checkout@master
- name: Setup Hugo
uses: peaceiris/actions-hugo@v1
with:
hugo-version: '0.128.2'
- name: Build static files
run: hugo --minify --environment production
- name: Deploy - name: Deploy
uses: her-cat/upyun-deployer@v1 uses: her-cat/upyun-deployer@v1.0.3
with: with:
bucket: ${{ secrets.UPYUN_BUCKET }} bucket: ${{ secrets.UPYUN_BUCKET }}
operator: ${{ secrets.OPERATOR }} operator: ${{ secrets.UPYUN_OPERATOR_NAME }}
password: ${{ secrets.OPERATOR_PASSWORD }} password: ${{ secrets.UPYUN_OPERATOR_PWD }}
dir: koobaiblog # 需同步的本地目录 dir: 'public'
publish_dir: 'myblog'