Update upy.yml

This commit is contained in:
小赵同学 authored and GitHub committed 2024-07-28 09:20:12 +08:00
1 parent fb676aa1a0
commit aed5f49de8
1 file changed
+22 -19
+22 -19
View File
@@ -3,29 +3,32 @@ name: Deploy to UpYun
on: on:
push: push:
branches: branches:
- main - main # 根据您的实际情况修改分支名称
jobs: jobs:
build: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Repository master branch - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Setup Hugo - name: Debug Environment Variables
uses: peaceiris/actions-hugo@v2 run: |
with: echo "Bucket: ${{ secrets.UPYUN_BUCKET }}"
hugo-version: '0.128.2' echo "Operator: ${{ secrets.UPYUN_OPERATOR }}"
# 不推荐打印密码,但可以确认是否为空字符串
if [ -z "${{ secrets.UPYUN_PASSWORD }}" ]; then
echo "Password is empty or not set"
else
echo "Password is set"
fi
- name: Build static files - name: Deploy to UpYun
run: hugo --minify --environment production uses: her-cat/upyun-deployer@v1.0.3
with:
- name: Deploy bucket: ${{ secrets.UPYUN_BUCKET }}
uses: her-cat/upyun-deployer@v1.0.3 operator: ${{ secrets.UPYUN_OPERATOR }}
with: password: ${{ secrets.UPYUN_PASSWORD }}
bucket: ${{ secrets.UPYUN_BUCKET }} dir: 'public' # 确认这个目录是您的构建输出目录
operator: ${{ secrets.UPYUN_OPERATOR_NAME }} publish_dir: '/myblog'
password: ${{ secrets.UPYUN_OPERATOR_PWD }}
dir: 'public'
publish_dir: 'myblog'