Update upy.yml
This commit is contained in:
1 parent
88e8a13fa9
commit
84358deb09
1 file changed
+11
-35
+11
-35
@@ -1,49 +1,25 @@
|
|||||||
name: Deploy to UpYun
|
name: Sync Upyun
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- master
|
||||||
|
paths:
|
||||||
|
- '/**' # 目录内容有变化执行工作流
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository master branch
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@master
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Deploy
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: her-cat/upyun-deployer@v1
|
||||||
with:
|
|
||||||
hugo-version: '0.128.2'
|
|
||||||
extended: true
|
|
||||||
|
|
||||||
- name: Build static files
|
|
||||||
run: hugo --minify --environment production
|
|
||||||
|
|
||||||
- name: Check build output directory
|
|
||||||
run: ls -la public
|
|
||||||
|
|
||||||
- name: Debugging: List all files in workspace
|
|
||||||
run: |
|
|
||||||
echo "Listing all files in the workspace directory"
|
|
||||||
ls -la /github/workspace
|
|
||||||
|
|
||||||
- name: Check if public directory exists
|
|
||||||
run: |
|
|
||||||
if [ -d "/github/workspace/public" ]; then
|
|
||||||
echo "Public directory exists"
|
|
||||||
else
|
|
||||||
echo "Public directory does not exist"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Deploy to UpYun
|
|
||||||
uses: her-cat/upyun-deployer@v1.0.3
|
|
||||||
with:
|
with:
|
||||||
bucket: ${{ secrets.UPYUN_BUCKET }}
|
bucket: ${{ secrets.UPYUN_BUCKET }}
|
||||||
operator: ${{ secrets.UPYUN_OPERATOR_NAME }}
|
operator: ${{ secrets.OPERATOR }}
|
||||||
password: ${{ secrets.UPYUN_OPERATOR_PWD }}
|
password: ${{ secrets.OPERATOR_PASSWORD }}
|
||||||
dir: 'public'
|
dir: 'public' # 需同步的本地目录
|
||||||
Reference in new issue
Block a user