From 8c5f3c99e783e640b57362823c00bbe401a1f718 Mon Sep 17 00:00:00 2001 From: bonartm Date: Sat, 6 Mar 2021 16:02:53 +0100 Subject: [PATCH] add workflow --- .github/workflows/build_deploy.yml | 46 ++++++++++++++++++++++++++++++ requirements.txt | 2 ++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/build_deploy.yml create mode 100644 requirements.txt diff --git a/.github/workflows/build_deploy.yml b/.github/workflows/build_deploy.yml new file mode 100644 index 0000000..5f3f8f1 --- /dev/null +++ b/.github/workflows/build_deploy.yml @@ -0,0 +1,46 @@ +name: build and deploy the demo + +on: + push: + branches: [ master ] + + +jobs: + build-deploy: + runs-on: ubuntu-20.04 + steps: + - name: Checkout repo + uses: actions/checkout@v1 + with: + submodules: true + + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: '3.8' + architecture: 'x64' + + - name: Cache dependencies + uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + python3 -m pip install -r ./requirements.txt + python3 -m pip install . + + - name: Sphinx Build + run: cd demo && make html + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./demo/_build/html/ + + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..2063266 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +sphinx +docutils