-
Notifications
You must be signed in to change notification settings - Fork 71
35 lines (33 loc) · 947 Bytes
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: docs
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Hatch
uses: pypa/hatch@install
- name: Install dependencies
run: |
hatch run python -m pip install --upgrade pip
hatch run pip install -e ".[docs]"
hatch run pip install mindspore
- name: Build site
run: hatch run mkdocs build
- name: Deploy to gh-pages
if: github.event_name == 'push' && github.repository == 'mindspore-lab/mindone'
run: |
git config --global user.name MkDocs Deployer
git config --global user.email [email protected]
hatch run mike deploy -u -p $(hatch version | cut -d. -f1,2) latest
hatch run mike set-default -p latest