Skip to content

Commit 9cd2c92

Browse files
committed
ci: update build action
1 parent 3950049 commit 9cd2c92

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/mike-deploy.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Mkdocs Build
2+
3+
on:
4+
push:
5+
branches: [ "i18n/en-v1", "i18n/en-v2" ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
mike-deploy:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Set up Python
16+
uses: actions/setup-python@v3
17+
with:
18+
python-version: '3.x'
19+
- name: Split branch name
20+
env:
21+
BRANCH: ${{ github.ref_name }}
22+
id: split
23+
run: echo "version=${BRANCH##*/}" >> $GITHUB_OUTPUT
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip setuptools wheel
27+
pip install -r ./requirements.txt
28+
pip install mike
29+
- name: Config Git
30+
run: |
31+
git config user.name "$(git log -n 1 --pretty=format:%an)"
32+
git config user.email "$(git log -n 1 --pretty=format:%ae)"
33+
- name: Build package
34+
run: |
35+
git fetch origin en/deploy:en/deploy
36+
mike deploy --push --branch en/deploy ${{ steps.split.outputs.version }}

0 commit comments

Comments
 (0)