From 37f13cb294fd47288f7784e703334f7e1eaba19c Mon Sep 17 00:00:00 2001 From: DeathWish5 Date: Sat, 11 Sep 2021 16:31:10 +0800 Subject: [PATCH] Github actions to build page when push --- .github/workflows/deploy.yml | 29 +++++++++++++++++++++++++++++ requirements.txt | 28 ++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 requirements.txt diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..81262c3 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,29 @@ +name: Deploy + +on: + push: + branches: [main, dev] + +jobs: + deploy-doc: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: "3.x" + - name: Install dependencies + run: pip install -r requirements.txt + + - name: build doc + run: make html + + - name: create .nojekyll + run: touch build/html/.nojekyll + + - name: Push to gh-pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build/html \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d61da19 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,28 @@ +alabaster==0.7.12 +Babel==2.9.1 +certifi==2021.5.30 +charset-normalizer==2.0.4 +docutils==0.16 +idna==3.2 +imagesize==1.2.0 +jieba==0.42.1 +Jinja2==3.0.1 +MarkupSafe==2.0.1 +packaging==21.0 +Pygments==2.10.0 +pyparsing==2.4.7 +pytz==2021.1 +requests==2.26.0 +snowballstemmer==2.1.0 +Sphinx==4.1.2 +sphinx-comments==0.0.3 +sphinx-rtd-theme==0.5.2 +sphinx-tabs==3.2.0 +sphinxcontrib-applehelp==1.0.2 +sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-htmlhelp==2.0.0 +sphinxcontrib-jsmath==1.0.1 +sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-serializinghtml==1.1.5 +urllib3==1.26.6 +furo==2021.8.31