From 6569cb6f71f4d74bed1a036b44c70c06f98b7796 Mon Sep 17 00:00:00 2001 From: wavy-cat <52543076+wavy-cat@users.noreply.github.com> Date: Thu, 29 Aug 2024 21:19:26 +0500 Subject: [PATCH] New CI file --- .github/workflows/docs.yml | 50 ++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 44f178b..21f17b0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,4 +1,4 @@ -name: Docs +name: Deploy Docs on: push: @@ -6,29 +6,31 @@ on: - main - docs -permissions: - contents: write - jobs: - docs-gen: + build: runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - uses: actions/setup-python@v5 - with: - python-version: 3.12 - - name: Install dependencies - run: | - pip install -r docs/requirements.txt - - name: Sphinx build - run: | - sphinx-build docs/_build - - name: Deploy docs - uses: peaceiris/actions-gh-pages@v4 - with: - allow_empty_commit: true - personal_token: ${{ secrets.DEPLOY_TOKEN }} - publish_branch: gh-pages - publish_dir: docs/_build/ \ No newline at end of file + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install sphinx sphinx-immaterial + + - name: Build the docs + run: | + cd docs + make html + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/_build/html