xref: /DragonOS/.github/workflows/docs-multiversion.yml (revision c635d8a9cfe25bc11779f323ef0c7d7a0f597d4a)
1*c635d8a9SLoGinname: Build multiversion docs
2*c635d8a9SLoGin
3*c635d8a9SLoGinon:
4*c635d8a9SLoGin  push:
5*c635d8a9SLoGin    branches: [ "master" ]
6*c635d8a9SLoGin    tags: [ "v*", "V*"]
7*c635d8a9SLoGin
8*c635d8a9SLoGinenv:
9*c635d8a9SLoGin    GITHUB_REPOSITORY: ${{ github.repository }}
10*c635d8a9SLoGin    GITHUB_REF: ${{ github.ref }}
11*c635d8a9SLoGin
12*c635d8a9SLoGinjobs:
13*c635d8a9SLoGin
14*c635d8a9SLoGin  build-multiversion:
15*c635d8a9SLoGin    if: github.repository == 'DragonOS-Community/DragonOS'
16*c635d8a9SLoGin    runs-on: ubuntu-latest
17*c635d8a9SLoGin
18*c635d8a9SLoGin    steps:
19*c635d8a9SLoGin    - uses: actions/checkout@v4
20*c635d8a9SLoGin      with:
21*c635d8a9SLoGin        fetch-depth: 0
22*c635d8a9SLoGin        ref: master
23*c635d8a9SLoGin
24*c635d8a9SLoGin    - name: install requirements
25*c635d8a9SLoGin      working-directory: ./docs
26*c635d8a9SLoGin      run: |
27*c635d8a9SLoGin        sudo apt-get update
28*c635d8a9SLoGin        sudo apt-get install -y python3-pip
29*c635d8a9SLoGin        pip3 install -r requirements.txt
30*c635d8a9SLoGin
31*c635d8a9SLoGin    - name: build docs
32*c635d8a9SLoGin      working-directory: ./docs
33*c635d8a9SLoGin      shell: bash -ileo pipefail {0}
34*c635d8a9SLoGin
35*c635d8a9SLoGin      run: |
36*c635d8a9SLoGin        make html-multiversion
37