From 1826255a405d516b0e22fbbab921b55ce370fcc2 Mon Sep 17 00:00:00 2001 From: Alex Chan Date: Sat, 10 Aug 2024 20:21:35 +0200 Subject: [PATCH] updated deploy.yml --- .github/workflows/deploy.yml | 33 +++++++++++++++++---------------- deploy copy.yml | 26 ++++++++++++++++++++++++++ requirements.txt | 3 --- 3 files changed, 43 insertions(+), 19 deletions(-) create mode 100644 deploy copy.yml delete mode 100644 requirements.txt diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b5f2f5e..e56317a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,21 +6,22 @@ on: - gh-pages jobs: - build: + docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.x' - - - name: Install Sphinx & Dependencies - run: pip install sphinx sphinx_markdown_builder sphinx_rtd_theme - - name: Build Documentation - run: cd "$GITHUB_WORKSPACE/" && make html - - - uses: actions/upload-artifact@v3 - with: - name: Documentation - path: "$GITHUB_WORKSPACE/build/html" \ No newline at end of file + - 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 doc _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 diff --git a/deploy copy.yml b/deploy copy.yml new file mode 100644 index 0000000..b5f2f5e --- /dev/null +++ b/deploy copy.yml @@ -0,0 +1,26 @@ +name: Deploy Sphinx Docs to GitHub Pages + +on: + push: + branches: + - gh-pages + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + + - name: Install Sphinx & Dependencies + run: pip install sphinx sphinx_markdown_builder sphinx_rtd_theme + - name: Build Documentation + run: cd "$GITHUB_WORKSPACE/" && make html + + - uses: actions/upload-artifact@v3 + with: + name: Documentation + path: "$GITHUB_WORKSPACE/build/html" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 3185009..0000000 --- a/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -sphinx>=6.1.3 -docutils>=0.19 -sphinx-rtd-theme