From 0c22d0e254103a86b1611caa362df43ccd14fe61 Mon Sep 17 00:00:00 2001 From: silviana amethyst <1388063+ofloveandhate@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:12:41 -0500 Subject: [PATCH] towards automatic --- .github/workflows/documentation.yml | 39 +++++++++++++++-------------- docs/requirements.txt | 1 + 2 files changed, 21 insertions(+), 19 deletions(-) create mode 100644 docs/requirements.txt diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index e0d7bf4..a3140b9 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,27 +1,28 @@ -name: documentation +name: Sphinx build -on: [push, pull_request, workflow_dispatch] +on: push permissions: contents: write jobs: - docs: + build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - - name: Install dependencies - run: | - pip install sphinx sphinx_rtd_theme myst_parser - - name: Sphinx build - run: | - sphinx-build docs _build - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - with: - publish_branch: gh-pages - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: _build/ - force_orphan: true \ No newline at end of file + - uses: actions/checkout@v3 + + - name: Build HTML + uses: ammaraskar/sphinx-action@master + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: html-docs + path: docs/_build/html/ + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/build/html diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..a411efc --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1 @@ +canvasapi \ No newline at end of file