From 2c7feb021b045afb05b38c4268683a9f40399bfd Mon Sep 17 00:00:00 2001 From: Peter Chang Date: Fri, 16 Jun 2023 09:19:09 +0100 Subject: [PATCH 1/2] Add workflow step to CI to publish HTML version of the Impatient Guide (fixes #1257) Also update copyright year for guide and tweak .gitignore --- .github/workflows/ci.yaml | 13 ++++++++++--- .gitignore | 1 + impatient-guide/conf.py | 7 ++++--- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4bed1ad8e..2887bd0ea 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -72,7 +72,7 @@ jobs: run: | make prepare - - name: Build Impatient Guid + - name: Build Impatient Guide run: | make impatient-guide ls -lAFgh build/impatient-guide/build/html/index.html @@ -87,12 +87,19 @@ jobs: - name: Build and Commit the User Manual if: ${{ github.event.inputs.deploy && env.python_version == env.python_deploy_version }} - uses: sphinx-notes/pages@master + uses: sphinx-notes/pages@v3 with: # path to the conf.py directory documentation_path: build/manual/source - - name: Deploy the User Manual + - name: Build and Commit the Impatient Guide + if: ${{ github.event.inputs.deploy && env.python_version == env.python_deploy_version }} + uses: sphinx-notes/pages@v3 + with: + # path to the conf.py directory + documentation_path: build/impatient-guide + + - name: Deploy both the User Manual and the Impatient Guide if: ${{ github.event.inputs.deploy && env.python_version == env.python_deploy_version }} uses: ad-m/github-push-action@master with: diff --git a/.gitignore b/.gitignore index ff21c1627..ae7946a34 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Hidden files .* +!.github # Python byte / compiled / optimized *.py[cod] diff --git a/impatient-guide/conf.py b/impatient-guide/conf.py index 165ad7d7a..b72068fe2 100644 --- a/impatient-guide/conf.py +++ b/impatient-guide/conf.py @@ -40,17 +40,18 @@ master_doc = 'index' # General information about the project. +year = '2022' # str(datetime.datetime.now().year) project = u'NeXus for the Impatient' -copyright = u'2014-2016, http://nexusformat.org' +copyright = u'2014-{}, http://nexusformat.org'.format(year) # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '2016' +version = year # The full version, including alpha/beta/rc tags. -release = '2016' +release = year # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From cd1cf3fff0e5a164fb0877df7fb0c2543711ff85 Mon Sep 17 00:00:00 2001 From: Peter Chang Date: Mon, 19 Jun 2023 14:55:13 +0100 Subject: [PATCH 2/2] Use f-string --- impatient-guide/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impatient-guide/conf.py b/impatient-guide/conf.py index b72068fe2..0bedf1bde 100644 --- a/impatient-guide/conf.py +++ b/impatient-guide/conf.py @@ -42,7 +42,7 @@ # General information about the project. year = '2022' # str(datetime.datetime.now().year) project = u'NeXus for the Impatient' -copyright = u'2014-{}, http://nexusformat.org'.format(year) +copyright = f'2014-{year}, http://nexusformat.org' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the