Skip to content

Commit 55648a6

Browse files
committed
complete doc ci.
1 parent e89ca04 commit 55648a6

File tree

3 files changed

+40
-27
lines changed

3 files changed

+40
-27
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
name: CI
2-
# on:
3-
# push:
4-
# branches: [master]
5-
# pull_request:
6-
# branches: [master]
7-
# concurrency:
8-
# group: ${{ github.workflow }}-${{ github.ref }}
9-
# cancel-in-progress: true
10-
112
on:
12-
workflow_run:
13-
workflows: ["release-minor-trigger"]
14-
types:
15-
- completed
3+
push:
4+
branches: [master]
5+
pull_request:
6+
branches: [master]
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
1610

1711
jobs:
1812
build:

.github/workflows/release-minor.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
19+
- name: Configure Git Credentials
20+
run: |
21+
git config user.name Rinne
22+
git config user.email [email protected]
1923
- name: Setup NuGet
2024
uses: nuget/setup-nuget@v1
2125
with:
@@ -51,3 +55,22 @@ jobs:
5155

5256
- name: Push LLamaSharp packages to nuget.org
5357
run: dotnet nuget push ./temp/LLamaSharp*.nupkg --source https://www.nuget.org -k ${{ secrets.LLAMA_SHARP_NUGET_KEY }} --skip-duplicate
58+
59+
# Deploy the documentation to GitHub Pages
60+
- uses: actions/setup-python@v5
61+
with:
62+
python-version: 3.x
63+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
64+
- uses: actions/cache@v4
65+
with:
66+
key: mkdocs-material-${{ env.cache_id }}
67+
path: .cache
68+
restore-keys: |
69+
mkdocs-material-
70+
- run: pip install mkdocs==1.4.3 mkdocs-material mike==1.1.2 setuptools
71+
- run: |
72+
git fetch origin gh-pages --depth=1
73+
version=$(cat ./temp/version.txt)
74+
mike deploy --push --update-aliases --force $version latest
75+
mike set-default --push --force latest
76+

.github/workflows/release-patch.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
name: auto-patch-release
22

3-
# on:
4-
# workflow_run:
5-
# workflows: ["release-patch-trigger"]
6-
# types:
7-
# - completed
8-
93
on:
10-
push:
11-
branches:
12-
- 'doc_ci'
4+
workflow_run:
5+
workflows: ["release-patch-trigger"]
6+
types:
7+
- completed
138

149
env:
1510
NUGET_API_TOKEN: ${{ secrets.LLAMA_SHARP_NUGET_KEY }}
1611

1712
jobs:
1813
patch_release_to_nuget:
19-
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
14+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2015
runs-on: ubuntu-latest
2116

2217
steps:
@@ -58,9 +53,10 @@ jobs:
5853
name: "drop-ci-packages"
5954
path: './temp'
6055

61-
# - name: Push LLamaSharp packages to nuget.org
62-
# run: dotnet nuget push ./temp/LLamaSharp*.nupkg --source https://www.nuget.org -k ${{ secrets.LLAMA_SHARP_NUGET_KEY }} --skip-duplicate
56+
- name: Push LLamaSharp packages to nuget.org
57+
run: dotnet nuget push ./temp/LLamaSharp*.nupkg --source https://www.nuget.org -k ${{ secrets.LLAMA_SHARP_NUGET_KEY }} --skip-duplicate
6358

59+
# Deploy the documentation to GitHub Pages
6460
- uses: actions/setup-python@v5
6561
with:
6662
python-version: 3.x
@@ -74,7 +70,7 @@ jobs:
7470
- run: pip install mkdocs==1.4.3 mkdocs-material mike==1.1.2 setuptools
7571
- run: |
7672
git fetch origin gh-pages --depth=1
77-
version=$(cat ./temp/version.txt | sed 's/.$/2/')
73+
version=$(cat ./temp/version.txt)
7874
mike deploy --push --update-aliases --force $version latest
7975
mike set-default --push --force latest
8076

0 commit comments

Comments
 (0)