colossalai

Форк
0
/
doc_check_on_pr.yml 
76 строк · 2.4 Кб
1
name: Check Documentation on PR
2

3
on:
4
  pull_request:
5
    branches:
6
      - "main"
7
      - "develop"
8
      - "feature/**"
9
    paths:
10
      - "docs/**"
11

12
jobs:
13
  check-i18n:
14
    name: Check docs in diff languages
15
    if: |
16
      github.event.pull_request.draft == false &&
17
      github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
18
    runs-on: ubuntu-latest
19
    concurrency:
20
      group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-check-i18n
21
      cancel-in-progress: true
22
    steps:
23
      - uses: actions/checkout@v2
24

25
      - uses: actions/setup-python@v2
26
        with:
27
          python-version: "3.8.14"
28

29
      - run: python .github/workflows/scripts/check_doc_i18n.py -d docs/source
30

31
  check-doc-build:
32
    name: Test if the docs can be built
33
    if: |
34
      github.event.pull_request.draft == false &&
35
      github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
36
    runs-on: ubuntu-latest
37
    concurrency:
38
      group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-check-doc
39
      cancel-in-progress: true
40
    steps:
41
      - uses: actions/checkout@v2
42
        with:
43
          path: "./ColossalAI"
44
          fetch-depth: 0
45

46
      - uses: actions/checkout@v2
47
        with:
48
          path: "./ColossalAI-Documentation"
49
          repository: "hpcaitech/ColossalAI-Documentation"
50

51
      - uses: actions/setup-python@v2
52
        with:
53
          python-version: "3.8.14"
54

55
      # we use the versions in the main branch as the guide for versions to display
56
      # checkout will give your merged branch
57
      # therefore, we need to make the merged branch as the main branch
58
      # there is no main branch, so it's safe to checkout the main branch from the merged branch
59
      # docer will rebase the remote main branch to the merged branch, so we have to config user
60
      - name: Make the merged branch main
61
        run: |
62
          cd ColossalAI
63
          git checkout -b main
64
          git branch -u origin/main
65
          git config user.name 'github-actions'
66
          git config user.email 'github-actions@github.com'
67

68
      - name: Build docs
69
        run: |
70
          cache_dir=ColossalAI-Documentation/doc-build/.cache
71
          mkdir $cache_dir
72
          mv ColossalAI $cache_dir
73
          cd ColossalAI-Documentation
74
          pip install -v ./doc-build/third_party/hf-doc-builder
75
          pip install -v ./doc-build
76
          bash ./scripts/build.sh
77

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.