From afc70e4a5b8f48b0f0e2f4c231119d5a6be528dc Mon Sep 17 00:00:00 2001 From: Yi-Te Huang <44385685+ytdHuang@users.noreply.github.com> Date: Mon, 11 Nov 2024 22:58:57 +0900 Subject: [PATCH 1/3] fix the location of `versions.js` --- docs/src/.vitepress/config.mts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/.vitepress/config.mts b/docs/src/.vitepress/config.mts index fa49c508..07c86952 100644 --- a/docs/src/.vitepress/config.mts +++ b/docs/src/.vitepress/config.mts @@ -29,7 +29,7 @@ export default defineConfig({ outDir: 'REPLACE_ME_DOCUMENTER_VITEPRESS', // This is required for MarkdownVitepress to work correctly... head: [ ['link', { rel: 'icon', href: 'REPLACE_ME_DOCUMENTER_VITEPRESS_FAVICON' }], - ['script', {src: `/versions.js`}], + ['script', {src: `/QuantumToolbox.jl/versions.js`}], ['script', {src: `${baseTemp.base}siteinfo.js`}] ], ignoreDeadLinks: true, From 0229de307095f7b632d92d6bd26b4631e9bc194c Mon Sep 17 00:00:00 2001 From: Yi-Te Huang <44385685+ytdHuang@users.noreply.github.com> Date: Mon, 11 Nov 2024 23:12:12 +0900 Subject: [PATCH 2/3] Create CI pipeline to clean preview documentation --- .github/workflows/CleanPreviewDoc.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/CleanPreviewDoc.yml diff --git a/.github/workflows/CleanPreviewDoc.yml b/.github/workflows/CleanPreviewDoc.yml new file mode 100644 index 00000000..b942904d --- /dev/null +++ b/.github/workflows/CleanPreviewDoc.yml @@ -0,0 +1,26 @@ +name: Cleanup Preview Documentation + +on: + pull_request: + types: [closed] + +jobs: + doc-preview-cleanup: + runs-on: ubuntu-latest + steps: + - name: Checkout gh-pages branch + uses: actions/checkout@v4 + with: + ref: gh-pages + - name: Delete preview and history + push changes + run: | + if [ -d "previews/PR$PRNUM" ]; then + git config user.name "Documenter.jl" + git config user.email "documenter@juliadocs.github.io" + git rm -rf "previews/PR$PRNUM" + git commit -m "delete preview" + git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}) + git push --force origin gh-pages-new:gh-pages + fi + env: + PRNUM: ${{ github.event.number }} From 0889007b680907444035cc475e9be6e0dce4002f Mon Sep 17 00:00:00 2001 From: Yi-Te Huang <44385685+ytdHuang@users.noreply.github.com> Date: Mon, 11 Nov 2024 23:22:35 +0900 Subject: [PATCH 3/3] minor changes --- .github/workflows/CleanPreviewDoc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CleanPreviewDoc.yml b/.github/workflows/CleanPreviewDoc.yml index b942904d..d3e4de25 100644 --- a/.github/workflows/CleanPreviewDoc.yml +++ b/.github/workflows/CleanPreviewDoc.yml @@ -5,7 +5,7 @@ on: types: [closed] jobs: - doc-preview-cleanup: + cleanup-preview-doc: runs-on: ubuntu-latest steps: - name: Checkout gh-pages branch