|
|
@ -14,25 +14,39 @@ on:
|
|
|
|
branches:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- main
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
env:
|
|
|
|
|
|
|
|
TZ: Asia/Shanghai # 设置当前环境时区
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
- name: Git Configuration
|
|
|
|
name: Checkout
|
|
|
|
run: |
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
git config --global core.quotePath false
|
|
|
|
-
|
|
|
|
git config --global core.autocrlf false
|
|
|
|
name: Setup Hugo
|
|
|
|
git config --global core.safecrlf true
|
|
|
|
|
|
|
|
git config --global core.ignorecase false
|
|
|
|
|
|
|
|
git config --global user.name "github-actions[bot]"
|
|
|
|
|
|
|
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
|
|
|
|
- name: Setup Hugo
|
|
|
|
uses: peaceiris/actions-hugo@v2
|
|
|
|
uses: peaceiris/actions-hugo@v2
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
hugo-version: 'latest'
|
|
|
|
hugo-version: 'latest'
|
|
|
|
extended: true
|
|
|
|
extended: true
|
|
|
|
-
|
|
|
|
|
|
|
|
name: Build
|
|
|
|
- name: Checkout
|
|
|
|
run: hugo --minify
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
-
|
|
|
|
with:
|
|
|
|
name: deploy-upyun
|
|
|
|
submodules: recursive
|
|
|
|
uses: bwcxyk/upyun-upx-action@main
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
|
|
|
|
run:
|
|
|
|
|
|
|
|
hugo --minify
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: deploy-upyun
|
|
|
|
|
|
|
|
uses: bwcxyk/upyun-upx-action@1.1
|
|
|
|
env:
|
|
|
|
env:
|
|
|
|
bucket: ${{ secrets.BUCKET }}
|
|
|
|
bucket: ${{ secrets.BUCKET }}
|
|
|
|
operator: ${{ secrets.OPERATOR }}
|
|
|
|
operator: ${{ secrets.OPERATOR }}
|
|
|
|