diff --git a/.github/workflows/publish_docs.yaml b/.github/workflows/publish_docs.yaml new file mode 100644 index 0000000..f34c73a --- /dev/null +++ b/.github/workflows/publish_docs.yaml @@ -0,0 +1,50 @@ +name: Build & Publish Docs + +on: + push: + branches: + - docs + +jobs: + build_and_test: + name: Build bruteforcer + runs-on: ubuntu-24.04 + steps: + - name: Checkout repo + uses: actions/checkout@v2 + with: + path: src/ + submodules: recursive + + - name: Cache apt packages + uses: actions/cache@v2 + with: + path: /var/cache/apt/archives + key: ${{ runner.os }}-apt-${{ hashFiles('/etc/apt/sources.list') }} + + - name: Install prerequisites + run: | + sudo apt-get update + sudo apt-get install -y build-essential \ + git \ + cmake \ + ninja-build \ + python3 \ + + - name: Make build dir + run: mkdir src/build + + - name: Generate build files + run: cmake -S src/ -B src/build -DCMAKE_GENERATOR=Ninja -DCMAKE_BUILD_TYPE=Debug -DNIC_TYPE=AF_XDP -DBUILD_DOCS=ON + + - name: Build docs + run: ninja -C src/build Sphinx + + - name: Upload artifact + uses: actions/upload-pages-artifact@v4 + with: + path: 'src/build/docs/sphinx/html' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/.readthedocs.yaml b/.readthedocs.yaml deleted file mode 100644 index f058aa6..0000000 --- a/.readthedocs.yaml +++ /dev/null @@ -1,20 +0,0 @@ -version: 2 - -build: - os: ubuntu-24.04 - tools: - python: "3.12" - apt_packages: - - cmake - - ninja-build - jobs: - pre_build: - - mkdir build - - cmake -B build -DBUILD_DOCS=ON -DNIC_TYPE=AF_XDP - - ninja -C build Sphinx - - mkdir --parents $READTHEDOCS_OUTPUT/html/ - - cp -r build/docs/sphinx/html $READTHEDOCS_OUTPUT/html/ - -python: - install: - - requirements: docs/requirements.txt