Merge branch 'main' of https://github.com/zqlit/blog
This commit is contained in:
commit
1bb632a273
1 file changed
+32
@@ -0,0 +1,32 @@
|
|||||||
|
name: 发布博客
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: "pages"
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: 下载代码
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: 配置阿里云OSS
|
||||||
|
uses: manyuanrong/setup-ossutil@v3.0
|
||||||
|
with:
|
||||||
|
endpoint: ${{ secrets.OSS_ENDPOINT }}
|
||||||
|
access-key-id: ${{ secrets.OSS_ACCESS_KEY_ID }}
|
||||||
|
access-key-secret: ${{ secrets.OSS_ACCESS_KEY_SECRET }}
|
||||||
|
|
||||||
|
- name: 增量上传资源(排除 public 文件夹)
|
||||||
|
run: |
|
||||||
|
# 查找所有文件,排除 public 文件夹
|
||||||
|
find . -path ./public -prune -o -type f -print | xargs -I {} ossutil cp {} oss://${{ secrets.OSS_BUCKET }}/{} --update
|
||||||
Reference in new issue
Block a user