Merge branch 'main' of https://github.com/imzql/blog
This commit is contained in:
commit
1d8edcb516
1 file changed
+21
-11
+21
-11
@@ -1,12 +1,7 @@
|
|||||||
name: Sync Upyun
|
name: Deploy to UpYun
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
paths:
|
|
||||||
- 'blog/**' # 目录内容有变化执行工作流
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -14,12 +9,27 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository master branch
|
- name: Checkout Repository master branch
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Hugo
|
||||||
|
uses: peaceiris/actions-hugo@v2
|
||||||
|
with:
|
||||||
|
hugo-version: 'latest'
|
||||||
|
extended: true
|
||||||
|
|
||||||
|
- name: Build static files
|
||||||
|
run: hugo --minify --environment production
|
||||||
|
|
||||||
|
- name: Check build output
|
||||||
|
run: ls -la public
|
||||||
|
|
||||||
|
- name: List workspace contents
|
||||||
|
run: ls -la /github/workspace
|
||||||
|
|
||||||
- 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: blog # 需同步的本地目录
|
dir: 'public'
|
||||||
Reference in new issue
Block a user