From 70de5d763dac7fb9a573a07e11dde70b792dc44a Mon Sep 17 00:00:00 2001 From: TheaperDeng Date: Thu, 17 Oct 2024 14:37:31 -0500 Subject: [PATCH 1/3] try --- .github/workflows/doc.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index a6891db4..2e21965d 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -27,6 +27,15 @@ jobs: publish_branch: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: _build/ - force_orphan: tru + force_orphan: true + - name: Deploy + 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/ + destination_dir: ${{ github.ref_name }} # Use branch name as folder + force_orphan: false # Preserve existing files - uses: eviden-actions/clean-self-hosted-runner@v1 if: ${{ always() }} # To ensure this step runs even when earlier steps fail From fedaf96a22c2c036fc2261cf94be586ac8804097 Mon Sep 17 00:00:00 2001 From: TheaperDeng Date: Thu, 17 Oct 2024 14:42:06 -0500 Subject: [PATCH 2/3] add doc change --- .github/workflows/doc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 2e21965d..635a9124 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -4,7 +4,7 @@ jobs: docs: permissions: contents: write - runs-on: self-hosted + runs-on: ubuntu-latest strategy: matrix: python-version: ["3.10"] From fcb4997b0e84f15c4cbcb14ededfe7d09a1331c6 Mon Sep 17 00:00:00 2001 From: TheaperDeng Date: Thu, 17 Oct 2024 14:55:24 -0500 Subject: [PATCH 3/3] update --- .github/workflows/doc.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 635a9124..231a3f12 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -4,7 +4,7 @@ jobs: docs: permissions: contents: write - runs-on: ubuntu-latest + runs-on: self-hosted strategy: matrix: python-version: ["3.10"] @@ -27,8 +27,8 @@ jobs: publish_branch: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: _build/ - force_orphan: true - - name: Deploy + force_orphan: false + - name: Deploy-not-main uses: peaceiris/actions-gh-pages@v3 if: ${{ github.event_name == 'push' && github.ref != 'refs/heads/main'}} with: