Commit b3a87be8 authored by narugo1992's avatar narugo1992
Browse files

dev(narugo): try new docs framework

parent 79c4bcbc
Loading
Loading
Loading
Loading
+68 −0
Original line number Diff line number Diff line
@@ -10,8 +10,76 @@ on:
    types: [ published ]

jobs:
  contents:
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, 'ci skip')"
    strategy:
      matrix:
        python-version: [ 3.7 ]

    services:
      plantuml:
        image: plantuml/plantuml-server
        ports:
          - 18080:8080

    steps:
      - name: Set Swap Space
        uses: pierotofy/set-swap-space@master
        with:
          swap-size-gb: 8
      - name: Checkout code
        uses: actions/checkout@v2
        with:
          fetch-depth: 20
          submodules: 'recursive'
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install dependencies
        run: |
          sudo apt-get update -y
          sudo apt-get install -y make wget curl cloc graphviz pandoc
          dot -V
          python -m pip install -r requirements.txt
          python -m pip install -r requirements-doc.txt
      - name: Prepare dataset
        uses: nick-fields/retry@v2
        env:
          CI: 'true'
          HF_NARUGO_USERNAME: ${{ secrets.HF_NARUGO_USERNAME }}
          HF_NARUGO_PASSWORD: ${{ secrets.HF_NARUGO_PASSWORD }}
        with:
          shell: bash
          timeout_minutes: 20
          max_attempts: 5
          retry_on: any
          command: |
            make dataset
      - name: Generate the contents
        env:
          ENV_PROD: 'true'
          PLANTUML_HOST: http://localhost:18080
        run: |
          plantumlcli -c
          make docs
      - name: Change Commit
        id: commit
        run: |
          git config user.name 'narugo1992'
          git config user.email 'narugo@126.com'
          git add -A
          git diff-index --quiet HEAD || git commit -a -m "dev(narugo): auto sync $(date -R)"
      - name: Push changes
        uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}

  doc:
    runs-on: ubuntu-latest
    needs:
      - contents
    if: "!contains(github.event.head_commit.message, 'ci skip')"
    strategy:
      matrix:
+1 −0
Original line number Diff line number Diff line
@@ -1205,6 +1205,7 @@ fabric.properties
/docs/source/**/*.sh.err
/docs/source/**/*.sh.exitcode
/docs/source/**/*.dat.*
!/docs/source/**/*.bm.*
!/docs/source/_static/**/*
/docs/source/**/*.result.ipynb
/cartpole_dqn_*
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ if __name__ == '__main__':
            ('face (yolov8s)', FaceDetectBenchmark('s')),
            ('face (yolov8n)', FaceDetectBenchmark('n')),
        ],
        save_as='benchmark_face_detect.dat.svg',
        save_as='benchmark_face_detect.bm.svg',
        title='Benchmark for Anime Face Detections',
        run_times=10,
        try_times=5,
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ if __name__ == '__main__':
            ('person (yolov8m)', PersonDetectBenchmark('m')),
            ('person (yolov8x)', PersonDetectBenchmark('x')),
        ],
        save_as='benchmark_person_detect.dat.svg',
        save_as='benchmark_person_detect.bm.svg',
        title='Benchmark for Anime Person Detections',
        run_times=10,
        try_times=5,
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ if __name__ == '__main__':
            ('lineart (coarse)', LineartBenchmark(coarse=True)),
            ('lineart-anime', LineartAnimeBenchmark()),
        ],
        save_as='benchmark_edge.dat.svg',
        save_as='benchmark_edge.bm.svg',
        title='Benchmark for Edge Models',
        run_times=10,
        try_times=5,
Loading