From a230ffcf87752dc3faeb12c8cd92663bfa2bbf4e Mon Sep 17 00:00:00 2001 From: Ben Cumming Date: Mon, 10 Feb 2025 11:24:40 +0100 Subject: [PATCH 1/5] Update readme.md --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index c6ed3e5a..55e8e220 100644 --- a/readme.md +++ b/readme.md @@ -13,8 +13,8 @@ The source CSCS documentation [docs.cscs.ch](httpa://docs.cscs.ch) Clone this repository on your PC/laptop, then view the documentation in a browser run `./serve`: ```bash -> git clone git@github.com:${githubusername}/kb.git -> cd kb +> git clone git@github.com:${githubusername}/cscs-docs.git +> cd cscs-docs > ./serve ... INFO - [08:33:34] Serving on http://127.0.0.1:8000/ From 6997d4d0d6faf2e946a01d4f3de6d8d08d346ebc Mon Sep 17 00:00:00 2001 From: bcumming Date: Mon, 10 Feb 2025 11:34:02 +0100 Subject: [PATCH 2/5] clean up the mkdocs configuration --- mkdocs.yml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index a05b4c0f..fc056196 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,12 +1,18 @@ site_name: CSCS Knowledge Base -# TODO: change to match target deployment -#site_url: https://eth-cscs.github.io/ +# TODO: change to https://docs.cscs.ch when the time comes +site_url: https://eth-cscs.github.io/ # provide a link to the docs in top RHS corner repo_url: https://github.com/eth-cscs/cscs-docs # provide a link to "edit this page" to each page edit_uri: edit/main/docs/ - +extra_css: + - stylesheets/extra.css +plugins: + - search: + pipeline: + - trimmer + - autorefs nav: - Welcome: index.md - 'Alps': @@ -55,7 +61,6 @@ nav: theme: name: material language: en - #custom_dir: docs/.overrides features: - content.code.copy # add an "edit this page" icon on each page @@ -92,18 +97,10 @@ theme: toggle: icon: material/brightness-4 name: Switch to light mode - logo: assets/cscs-logo.png font: text: Roboto code: Roboto Mono - -plugins: - - search: - pipeline: - - trimmer - - autorefs - markdown_extensions: - admonition - def_list @@ -140,6 +137,3 @@ markdown_extensions: # - javascripts/mathjax.js # - https://unpkg.com/mathjax@3/es5/tex-mml-chtml.js -extra_css: - - stylesheets/extra.css - From 0bcdeb4ad03a171e258bf80ea7a944f42b1b7ab5 Mon Sep 17 00:00:00 2001 From: bcumming Date: Mon, 10 Feb 2025 11:53:45 +0100 Subject: [PATCH 3/5] change site title from KB to Documentation --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index fc056196..c77e9611 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: CSCS Knowledge Base +site_name: CSCS Documentation # TODO: change to https://docs.cscs.ch when the time comes site_url: https://eth-cscs.github.io/ From 4e26254291841f6d92803edc5b4a7067fa74b130 Mon Sep 17 00:00:00 2001 From: bcumming Date: Mon, 10 Feb 2025 11:59:51 +0100 Subject: [PATCH 4/5] fix curl call that posts a link to the preview docs to the PR --- .github/workflows/docs_pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs_pr.yaml b/.github/workflows/docs_pr.yaml index 1f079498..c26c0087 100644 --- a/.github/workflows/docs_pr.yaml +++ b/.github/workflows/docs_pr.yaml @@ -43,7 +43,7 @@ jobs: curl -L -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - "https://api.github.com/repos/bcumming/kb-poc/issues/${{ github.event.pull_request.number }}/comments" \ + "https://api.github.com/repos/eth-cscs/cscs-docs/issues/${{ github.event.pull_request.number }}/comments" \ -d '{ "body": "preview available: https://docs.tds.cscs.ch/${{ github.event.pull_request.number }}" }' From a8d9066ba9a30a4374ef0c54a9914a298fb01b4b Mon Sep 17 00:00:00 2001 From: bcumming Date: Mon, 10 Feb 2025 13:44:57 +0100 Subject: [PATCH 5/5] move commit comment to workflow with access to GITHUB_TOKEN --- .github/workflows/docs_pr.yaml | 9 --------- .github/workflows/docs_pr_upload.yaml | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docs_pr.yaml b/.github/workflows/docs_pr.yaml index c26c0087..b7a90642 100644 --- a/.github/workflows/docs_pr.yaml +++ b/.github/workflows/docs_pr.yaml @@ -38,12 +38,3 @@ jobs: name: docs path: upload if-no-files-found: error - - name: Post comment with preview URL - run: | - curl -L -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - "https://api.github.com/repos/eth-cscs/cscs-docs/issues/${{ github.event.pull_request.number }}/comments" \ - -d '{ - "body": "preview available: https://docs.tds.cscs.ch/${{ github.event.pull_request.number }}" - }' diff --git a/.github/workflows/docs_pr_upload.yaml b/.github/workflows/docs_pr_upload.yaml index 0124c5f2..e59c40a1 100644 --- a/.github/workflows/docs_pr_upload.yaml +++ b/.github/workflows/docs_pr_upload.yaml @@ -24,3 +24,12 @@ jobs: ls -alh PR_NBR=$(cat pr_number.txt) curl --data-binary @site.tar.gz -H "Authorization: Bearer ${{ secrets.UPLOAD_TOKEN }}" https://docs.tds.cscs.ch/upload?path=$PR_NBR + - name: Post comment with preview URL + run: | + curl -L -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + "https://api.github.com/repos/eth-cscs/cscs-docs/issues/${{ github.event.pull_request.number }}/comments" \ + -d '{ + "body": "preview available: https://docs.tds.cscs.ch/${{ github.event.pull_request.number }}" + }'