From 0c1001331c6785d611240a27a56e581d73941394 Mon Sep 17 00:00:00 2001 From: Jonas Jucker Date: Mon, 21 Aug 2023 15:01:40 +0200 Subject: [PATCH 1/2] push to toplevel of gh-pages too --- .github/workflows/deploy_docs.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/deploy_docs.yml diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml new file mode 100644 index 0000000000..dfac017ca1 --- /dev/null +++ b/.github/workflows/deploy_docs.yml @@ -0,0 +1,24 @@ +name: Deploy docs to latest + +on: + push: + branches: + - main + +jobs: + deploy-docs: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build docs + uses: C2SM/sphinx-action@sphinx-latest + with: + pre-build-command: "pip install sphinx_rtd_theme && pip install sphinx-copybutton" + build-command: "sphinx-build -b html . _build" + docs-folder: "docs/" + - uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/_build + allow_empty_commit: true From 53352abf2c9840d37b3fc40f474eb381644a1d02 Mon Sep 17 00:00:00 2001 From: Jonas Jucker Date: Mon, 21 Aug 2023 15:26:47 +0200 Subject: [PATCH 2/2] do not overwrite gh-pages --- .github/workflows/deploy_docs.yml | 24 --------------------- .github/workflows/deploy_docs_to_latest.yml | 5 ----- 2 files changed, 29 deletions(-) delete mode 100644 .github/workflows/deploy_docs.yml diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml deleted file mode 100644 index dfac017ca1..0000000000 --- a/.github/workflows/deploy_docs.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Deploy docs to latest - -on: - push: - branches: - - main - -jobs: - deploy-docs: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Build docs - uses: C2SM/sphinx-action@sphinx-latest - with: - pre-build-command: "pip install sphinx_rtd_theme && pip install sphinx-copybutton" - build-command: "sphinx-build -b html . _build" - docs-folder: "docs/" - - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/_build - allow_empty_commit: true diff --git a/.github/workflows/deploy_docs_to_latest.yml b/.github/workflows/deploy_docs_to_latest.yml index 2446cf20e1..1a7a6cc724 100644 --- a/.github/workflows/deploy_docs_to_latest.yml +++ b/.github/workflows/deploy_docs_to_latest.yml @@ -25,8 +25,3 @@ jobs: publish_dir: ./docs/_build destination_dir: ${{ env.DOCS_VERSION }} allow_empty_commit: true - - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/_build - allow_empty_commit: true