From 6a815a530f076349866ac7b6baef7f644f0e4469 Mon Sep 17 00:00:00 2001 From: Aleksander Kiryk Date: Thu, 12 Sep 2024 19:27:45 +0200 Subject: [PATCH] Upload documentation and add links --- .github/workflows/gh-pages-pr-remove.yml | 2 ++ .github/workflows/publish-webpage.yml | 4 ++++ tools/SiteSpawner/template/webpage/dev.md | 2 +- tools/SiteSpawner/template/webpage/main.md | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gh-pages-pr-remove.yml b/.github/workflows/gh-pages-pr-remove.yml index e6bbe3874fc..f2ede98f8a8 100644 --- a/.github/workflows/gh-pages-pr-remove.yml +++ b/.github/workflows/gh-pages-pr-remove.yml @@ -53,6 +53,8 @@ jobs: run: | rm -rf ${{ env.ROOT_DIR }}/html/dev/${{ steps.PR.outputs.number }} rm -rf ${{ env.ROOT_DIR }}/doctrees/dev/${{ steps.PR.outputs.number }} + mkdir -p public.new/html/dev/${{ steps.PR.outputs.number }}/docs_rendered + cp -arf ./docs_rendered/* public.new/html/dev/${{ steps.PR.outputs.number }}/docs_rendered sis -d webpage --loc-github-ref-name ${{ github.ref_name }} --loc-github-event-name ${{ github.event_name }} --pr-number ${{ steps.PR.outputs.number }} - name: Add redirect index page diff --git a/.github/workflows/publish-webpage.yml b/.github/workflows/publish-webpage.yml index 5b5530be91a..b9dee36d848 100644 --- a/.github/workflows/publish-webpage.yml +++ b/.github/workflows/publish-webpage.yml @@ -70,11 +70,15 @@ jobs: - name: Update webpage if: github.event_name != 'pull_request' run: | + mkdir -p public.new/html/main/docs_rendered + cp -arf ./docs_rendered/* public.new/html/main/docs_rendered sis -d webpage --loc-github-ref-name ${{ github.ref_name }} --loc-github-event-name ${{ github.event_name }} --pr-number 0 - name: Update webpage PR if: github.event_name == 'pull_request' run: | + mkdir -p public.new/html/dev/${{ github.event.number }}/docs_rendered + cp -arf ./docs_rendered/* public.new/html/dev/${{ github.event.number }}/docs_rendered sis -d webpage --loc-github-ref-name ${{ github.ref_name }} --loc-github-event-name ${{ github.event_name }} --pr-number ${{ github.event.number }} - name: Add redirect index page diff --git a/tools/SiteSpawner/template/webpage/dev.md b/tools/SiteSpawner/template/webpage/dev.md index 9ae49bf93bd..d5810fb2891 100644 --- a/tools/SiteSpawner/template/webpage/dev.md +++ b/tools/SiteSpawner/template/webpage/dev.md @@ -3,5 +3,5 @@ {%- for branch in branches %} * {{ branch }} * [Coverage]({{ branch }}_coverage_dashboard) - + * [Documentation](external:dev/{{ branch }}/docs_rendered/html/index.html) {%- endfor %} diff --git a/tools/SiteSpawner/template/webpage/main.md b/tools/SiteSpawner/template/webpage/main.md index 3697a640c7e..c63b616ce28 100644 --- a/tools/SiteSpawner/template/webpage/main.md +++ b/tools/SiteSpawner/template/webpage/main.md @@ -1,4 +1,4 @@ # Main branch * [Coverage](main_coverage_dashboard) - \ No newline at end of file + * [Documentation](external:main/docs_rendered/html/index.html)