From 539f3b095a0f1ae7651b9dac9fe58d2682a8e097 Mon Sep 17 00:00:00 2001 From: Tony031218 <975062472@qq.com> Date: Sun, 24 Jan 2021 11:31:46 +0800 Subject: [PATCH] set up Action workflow to build up docs --- .github/workflows/docs.yml | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..4027d60e --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,41 @@ +name: docs + +on: + push: + paths: + - 'docs/*' + +jobs: + docs: + runs-on: ubuntu-latest + name: build up document and deploy + + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Install sphinx + run: | + pip3 install --upgrade pip + sudo apt install python3-setuptools + cd .. + git clone https://github.com/sphinx-doc/sphinx + cd sphinx + pip3 install . + pip3 install sphinx_rtd_theme + + - name: Install manim env + run: | + pip3 install -r requirements.txt + + - name: Build document with Sphinx + run: | + cd docs + make html + + - name: Deploy to GitHub pages + uses: JamesIves/github-pages-deploy-action@master + env: + ACCESS_TOKEN: ${{ secrets.DOC_DEPLOY_TOKEN }} + BRANCH: gh-pages + FOLDER: docs/build/html \ No newline at end of file