From 3192bc0d01c8d2c384d1bc7992af02a157ff9c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=B5=B5=E5=90=8C=E5=AD=A6?= <94612053+imzql@users.noreply.github.com> Date: Sun, 28 Jul 2024 08:54:52 +0800 Subject: [PATCH] Update upy.yml --- .github/workflows/upy.yml | 46 ++++++++++----------------------------- 1 file changed, 11 insertions(+), 35 deletions(-) diff --git a/.github/workflows/upy.yml b/.github/workflows/upy.yml index 203c4363..0dd75440 100644 --- a/.github/workflows/upy.yml +++ b/.github/workflows/upy.yml @@ -1,49 +1,25 @@ -name: Deploy to UpYun +name: Sync Upyun on: workflow_dispatch: push: branches: - - main + - master + paths: + - '/**' # 目录内容有变化执行工作流 jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout Repository - uses: actions/checkout@v2 + - name: Checkout Repository master branch + uses: actions/checkout@master - - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 - 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 + - name: Deploy + uses: her-cat/upyun-deployer@v1 with: bucket: ${{ secrets.UPYUN_BUCKET }} - operator: ${{ secrets.UPYUN_OPERATOR_NAME }} - password: ${{ secrets.UPYUN_OPERATOR_PWD }} - dir: 'public' + operator: ${{ secrets.OPERATOR }} + password: ${{ secrets.OPERATOR_PASSWORD }} + dir: 'public' # 需同步的本地目录