chore: update gh-action for doc-fix (#4009)
* update gh-action for doc-fix * get tag * fetch-tags: * update actions/checkout@v4 * git fetch * update tag fetch
This commit is contained in:
Родитель
0826e593db
Коммит
07c347b4b9
|
@ -4,6 +4,8 @@ on:
|
|||
push:
|
||||
tags:
|
||||
- "*"
|
||||
branches:
|
||||
- doc-fix
|
||||
|
||||
jobs:
|
||||
publish-and-deploy:
|
||||
|
@ -12,9 +14,10 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout 🛎️
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-tags: true
|
||||
|
||||
- name: Setup .NET Core 3.1
|
||||
uses: actions/setup-dotnet@v3
|
||||
|
@ -52,7 +55,8 @@ jobs:
|
|||
- name: Publish Docs 🎉
|
||||
id: publish
|
||||
run: |
|
||||
VERSION=`git describe --tags`
|
||||
git fetch --all
|
||||
VERSION=$(wget --no-check-certificate -qO- https://api.github.com/repos/ant-design-blazor/ant-design-blazor/tags | grep 'name' | cut -d\" -f4 | head -1)
|
||||
echo "::set-output name=package_version::${VERSION}"
|
||||
npm install
|
||||
echo "/* updated `date "+%Y-%m-%d %H:%M:%S"` */" >> ./site/AntDesign.Docs.Wasm/wwwroot/service-worker.published.js
|
||||
|
|
Загрузка…
Ссылка в новой задаче