From 02be743d7546f25956221259ee9b270f46331d06 Mon Sep 17 00:00:00 2001
From: e-gugliotti-NOAA
Date: Fri, 9 Jun 2023 10:53:59 -0400
Subject: [PATCH 01/13] add auto release yml (still needs updating)
---
.github/workflows/release.yml | 258 ++++++++++++++++++++++++++++++++++
1 file changed, 258 insertions(+)
create mode 100644 .github/workflows/release.yml
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..19fc6d7f
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,258 @@
+name: Release
+
+on:
+ workflow_dispatch:
+
+jobs:
+
+ release:
+ runs-on: ubuntu-latest
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
+ RSPM: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"
+
+ steps:
+ - name: Setup Git repository
+ uses: actions/checkout@v3
+ fetch-depth: 0
+
+ - name: Update Ubuntu packages
+ run: sudo apt-get update
+
+ - name: Setup R
+ uses: r-lib/actions/setup-r@v2
+ with:
+ r-version: 'release'
+
+ - name: Setup pandoc
+ uses: r-lib/actions/setup-pandoc@v2
+ with:
+ pandoc-version: '2.14.0.3'
+
+ - name: Install rmarkdown
+ run: install.packages("rmarkdown")
+ shell: Rscript {0}
+
+# Get previous version and then create the next version
+ - name: Application Version
+ id: version
+ uses: paulhatch/semantic-version@v5.0.2
+ with:
+ tag_prefix: "v"
+ version_format: "v${major}.${minor}.${patch}"
+
+# Create version.txt to use when changing the version in the index.md
+ - name: Create version.txt
+ run: echo ${{ steps.version.outputs.version }} > version.txt
+
+# Update version and date in SS330_User_Manual.tex
+ - name: Update version and date in manual
+ run: |
+ version <- readLines("version.txt", encoding = "UTF-8")
+ version <- gsub("v", "", version)
+ manual_tex <- readLines("SS330_User_Manual.tex")
+ manual_tex[grep("Version", manual_tex)] <- gsub("[0-9].[0-9][0-9].[0-9][0-9]", version, manual_tex[grep("Version", manual_tex)])
+ date_line <- manual_tex[grep("date[{]", manual_tex)]
+ todays_month <- format(Sys.Date(), "%B")
+ todays_day <- format(Sys.Date(), "%d")
+ todays_year <- format(Sys.Date(), "%Y")
+ todays_date <- paste0("{", todays_month, " ", todays_day, ", ", todays_year, "}")
+ date_line <- gsub("\\{[^{}]*\\}", todays_date, date_line)
+ manual_tex[grep("date[{]", manual_tex)]<- date_line
+ writeLines(manual_tex, "SS330_User_Manual.tex")
+ shell: Rscript {0}
+
+ - name: Commit date and version changes in SS330_User_Manual.tex
+ uses: EndBug/add-and-commit@v9
+ with:
+ add: './docs/SS330_User_Manual.tex'
+ message: 'update version and date in manual'
+
+# HTML Portion
+ - name: Convert tex to html
+ run: pandoc SS330_User_Manual.tex -s -o SS330_User_Manual.html --toc --self-contained --mathjax --default-image-extension=png --number-sections --citeproc --variable linkcolor=#0033CC
+ # Note: for the following R code, may be a single command to deal with the double header issue before rendering.
+ - name: Edit html to improve formatting
+ run: |
+ html_txt <- readLines("SS330_User_Manual.html")
+ #read html snippits to add
+ html_snips <- readLines("html_usermanual_snippets.html")
+ # remove inline style
+ style_sec <- grep("style>", html_txt)
+ html_txt <- html_txt[-(style_sec[1]:style_sec[2])]
+ # add in the the navbar
+ navbar_snip <- grep("div", html_snips)
+ navbar_snip <- html_snips[navbar_snip[1]:navbar_snip[2]]
+ html_txt <- append(html_txt, navbar_snip, after = grep("_add:nnnCatalog Lang (enUS)
",
+ "", html_txt, fixed = TRUE)
+ # add link to css
+ css_snip <- grep(" ", html_txt))
+ # Add styling to tables add 1 because first col is on next row
+ first_lines <- grep("^",
+ "",
+ tmp_lines)
+ html_txt[first_lines] <- tmp_lines
+ # remove Typical Value double header
+ label <- grep(">Typical Value<", html_txt, fixed = TRUE)
+ diff_label <- diff(label)
+ to_rm <- which(diff_label <10)
+ # one to get rid of is test
+ to_rm_lines <- label[to_rm+1]
+ for (i in to_rm_lines) {
+ start <- grep(" Value<", html_txt, fixed = TRUE)
+ diff_label <- diff(label)
+ to_rm <- which(diff_label <10)
+ to_rm_lines <- label[to_rm+1]
+ for (i in to_rm_lines) {
+ start <- grep(" LO<", html_txt, fixed = TRUE)
+ diff_label <- diff(label)
+ to_rm <- which(diff_label < 20)
+ to_rm_lines <- label[to_rm+1]
+ for (i in to_rm_lines) {
+ start <- grep(" N Parameters<", html_txt, fixed = T)
+ diff_label <- diff(label)
+ to_rm <- which(diff_label == 5)
+ to_rm_lines <- label[to_rm+1]
+ for (i in to_rm_lines) {
+ start <- grep(" ',
+ html_txt, fixed = TRUE)
+ html_txt <- append(html_txt,
+ "Table of Contents ",
+ after = where_add[1])
+ # Add title to references
+ where_add <- (grep("references csl-bib-body hanging-indent",
+ html_txt, fixed = TRUE) - 1)
+ html_txt <- append(html_txt,
+ ' References ',
+ after = where_add)
+ # Add references to table of contents
+ where_add <- grep("", html_txt, fixed = TRUE)-2
+ html_txt <- append(html_txt,
+ '17 References ',
+ after = where_add)
+ writeLines(html_txt, "SS330_User_Manual.html")
+ writeLines(html_txt, "docs/SS330_User_Manual_release.html")
+ shell: Rscript {0}
+
+ - name: Commit html of manual to docs folder
+ uses: EndBug/add-and-commit@v9
+ with:
+ add: './docs/SS330_User_Manual_release.html'
+ message: 'update manual html in docs'
+
+# PDF Portion
+ - name: remove rendered file, check that is gone.
+ run: |
+ rm -rf SS330_User_Manual.pdf
+ ls
+ # - name: add lua filter to the repository
+ # run: wget https://raw.githubusercontent.com/klpn/accpdf/master/common/tagged-filter.lua
+
+ - name: Compile LaTeX document
+ uses: xu-cheng/latex-action@v2
+ with:
+ root_file: SS330_User_Manual.tex
+ #args: --lua-filter=tagged-filter.lua
+ latexmk_use_lualatex: true
+
+# Update the version in index.md
+ - name: Update version in index.md
+ run: |
+ version <- readLines("version.txt", encoding = "UTF-8")
+ index <- readLines("docs/index.md", encoding = "UTF-8")
+ version <- gsub("v", "", version)
+ index[6] <- gsub("[0-9].[0-9][0-9].[0-9][0-9]", version, index[6])
+ index[7] <- gsub("[0-9].[0-9][0-9].[0-9][0-9]", version, index[7])
+ writeLines(index, "docs/index.md")
+ shell: Rscript {0}
+
+# Commit changes to the version in index.md to the repository
+ - name: Commit changes made to index.md
+ uses: EndBug/add-and-commit@v9
+ with:
+ add: 'docs/index.md'
+ message: 'update index version'
+
+ # Create Release
+ - name: Create Release
+ id: create_release
+ uses: actions/create-release@v1
+ with:
+ tag_name: ${{ steps.version.outputs.version }}
+ release_name: ${{ steps.version.outputs.version }} Docs
+ draft: false
+ prerelease: false
+
+ # Add html as artifact for release
+ # Could change link in index for html to asset location so don't need to add html to docs folder
+ - name: Upload release artifact - html manual
+ uses: actions/upload-release-asset@v1
+ with:
+ upload_url: ${{ steps.create_release.outputs.upload_url }}
+ asset_path: ./SS330_User_Manual.html
+ asset_name: SS330_User_Manual.html
+ asset_content_type: application/html
+
+ # Add pdf as artifact for release
+ - name: Upload release artifact 2
+ uses: actions/upload-release-asset@v1
+ with:
+ upload_url: ${{ steps.create_release.outputs.upload_url }}
+ asset_path: ./SS330_User_Manual.pdf
+ asset_name: SS330_User_Manual.pdf
+ asset_content_type: application/pdf
+
+# Render github pages
+ - name: render the rmd files
+ run: |
+ rmarkdown::render("User_Guides/ss_model_tips/ss_model_tips.Rmd", output_format = c("html_document", "pdf_document"), output_dir = "docs")
+ rmarkdown::render("User_Guides/getting_started/Getting_Started_SS.Rmd", output_format = c("html_document", "pdf_document"), output_dir = "docs")
+ shell: Rscript {0}
+
+ - name: Deploy to GitHub pages
+ uses: JamesIves/github-pages-deploy-action@4.1.4
+ with:
+ branch: gh-pages
+ folder: docs/
\ No newline at end of file
From 50cebb57dcae58c59c6268e4531d1b5f839915e1 Mon Sep 17 00:00:00 2001
From: e-gugliotti-NOAA
Date: Fri, 9 Jun 2023 10:53:59 -0400
Subject: [PATCH 02/13] add auto release yml (still needs updating)
---
.github/workflows/release.yml | 258 ++++++++++++++++++++++++++++++++++
1 file changed, 258 insertions(+)
create mode 100644 .github/workflows/release.yml
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..19fc6d7f
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,258 @@
+name: Release
+
+on:
+ workflow_dispatch:
+
+jobs:
+
+ release:
+ runs-on: ubuntu-latest
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
+ RSPM: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"
+
+ steps:
+ - name: Setup Git repository
+ uses: actions/checkout@v3
+ fetch-depth: 0
+
+ - name: Update Ubuntu packages
+ run: sudo apt-get update
+
+ - name: Setup R
+ uses: r-lib/actions/setup-r@v2
+ with:
+ r-version: 'release'
+
+ - name: Setup pandoc
+ uses: r-lib/actions/setup-pandoc@v2
+ with:
+ pandoc-version: '2.14.0.3'
+
+ - name: Install rmarkdown
+ run: install.packages("rmarkdown")
+ shell: Rscript {0}
+
+# Get previous version and then create the next version
+ - name: Application Version
+ id: version
+ uses: paulhatch/semantic-version@v5.0.2
+ with:
+ tag_prefix: "v"
+ version_format: "v${major}.${minor}.${patch}"
+
+# Create version.txt to use when changing the version in the index.md
+ - name: Create version.txt
+ run: echo ${{ steps.version.outputs.version }} > version.txt
+
+# Update version and date in SS330_User_Manual.tex
+ - name: Update version and date in manual
+ run: |
+ version <- readLines("version.txt", encoding = "UTF-8")
+ version <- gsub("v", "", version)
+ manual_tex <- readLines("SS330_User_Manual.tex")
+ manual_tex[grep("Version", manual_tex)] <- gsub("[0-9].[0-9][0-9].[0-9][0-9]", version, manual_tex[grep("Version", manual_tex)])
+ date_line <- manual_tex[grep("date[{]", manual_tex)]
+ todays_month <- format(Sys.Date(), "%B")
+ todays_day <- format(Sys.Date(), "%d")
+ todays_year <- format(Sys.Date(), "%Y")
+ todays_date <- paste0("{", todays_month, " ", todays_day, ", ", todays_year, "}")
+ date_line <- gsub("\\{[^{}]*\\}", todays_date, date_line)
+ manual_tex[grep("date[{]", manual_tex)]<- date_line
+ writeLines(manual_tex, "SS330_User_Manual.tex")
+ shell: Rscript {0}
+
+ - name: Commit date and version changes in SS330_User_Manual.tex
+ uses: EndBug/add-and-commit@v9
+ with:
+ add: './docs/SS330_User_Manual.tex'
+ message: 'update version and date in manual'
+
+# HTML Portion
+ - name: Convert tex to html
+ run: pandoc SS330_User_Manual.tex -s -o SS330_User_Manual.html --toc --self-contained --mathjax --default-image-extension=png --number-sections --citeproc --variable linkcolor=#0033CC
+ # Note: for the following R code, may be a single command to deal with the double header issue before rendering.
+ - name: Edit html to improve formatting
+ run: |
+ html_txt <- readLines("SS330_User_Manual.html")
+ #read html snippits to add
+ html_snips <- readLines("html_usermanual_snippets.html")
+ # remove inline style
+ style_sec <- grep("style>", html_txt)
+ html_txt <- html_txt[-(style_sec[1]:style_sec[2])]
+ # add in the the navbar
+ navbar_snip <- grep("div", html_snips)
+ navbar_snip <- html_snips[navbar_snip[1]:navbar_snip[2]]
+ html_txt <- append(html_txt, navbar_snip, after = grep("_add:nnnCatalog Lang (enUS) ",
+ "", html_txt, fixed = TRUE)
+ # add link to css
+ css_snip <- grep(" ", html_txt))
+ # Add styling to tables add 1 because first col is on next row
+ first_lines <- grep("^",
+ "",
+ tmp_lines)
+ html_txt[first_lines] <- tmp_lines
+ # remove Typical Value double header
+ label <- grep(">Typical Value<", html_txt, fixed = TRUE)
+ diff_label <- diff(label)
+ to_rm <- which(diff_label <10)
+ # one to get rid of is test
+ to_rm_lines <- label[to_rm+1]
+ for (i in to_rm_lines) {
+ start <- grep(" Value<", html_txt, fixed = TRUE)
+ diff_label <- diff(label)
+ to_rm <- which(diff_label <10)
+ to_rm_lines <- label[to_rm+1]
+ for (i in to_rm_lines) {
+ start <- grep(" LO<", html_txt, fixed = TRUE)
+ diff_label <- diff(label)
+ to_rm <- which(diff_label < 20)
+ to_rm_lines <- label[to_rm+1]
+ for (i in to_rm_lines) {
+ start <- grep(" N Parameters<", html_txt, fixed = T)
+ diff_label <- diff(label)
+ to_rm <- which(diff_label == 5)
+ to_rm_lines <- label[to_rm+1]
+ for (i in to_rm_lines) {
+ start <- grep(" ',
+ html_txt, fixed = TRUE)
+ html_txt <- append(html_txt,
+ "Table of Contents ",
+ after = where_add[1])
+ # Add title to references
+ where_add <- (grep("references csl-bib-body hanging-indent",
+ html_txt, fixed = TRUE) - 1)
+ html_txt <- append(html_txt,
+ ' References ',
+ after = where_add)
+ # Add references to table of contents
+ where_add <- grep("", html_txt, fixed = TRUE)-2
+ html_txt <- append(html_txt,
+ '17 References ',
+ after = where_add)
+ writeLines(html_txt, "SS330_User_Manual.html")
+ writeLines(html_txt, "docs/SS330_User_Manual_release.html")
+ shell: Rscript {0}
+
+ - name: Commit html of manual to docs folder
+ uses: EndBug/add-and-commit@v9
+ with:
+ add: './docs/SS330_User_Manual_release.html'
+ message: 'update manual html in docs'
+
+# PDF Portion
+ - name: remove rendered file, check that is gone.
+ run: |
+ rm -rf SS330_User_Manual.pdf
+ ls
+ # - name: add lua filter to the repository
+ # run: wget https://raw.githubusercontent.com/klpn/accpdf/master/common/tagged-filter.lua
+
+ - name: Compile LaTeX document
+ uses: xu-cheng/latex-action@v2
+ with:
+ root_file: SS330_User_Manual.tex
+ #args: --lua-filter=tagged-filter.lua
+ latexmk_use_lualatex: true
+
+# Update the version in index.md
+ - name: Update version in index.md
+ run: |
+ version <- readLines("version.txt", encoding = "UTF-8")
+ index <- readLines("docs/index.md", encoding = "UTF-8")
+ version <- gsub("v", "", version)
+ index[6] <- gsub("[0-9].[0-9][0-9].[0-9][0-9]", version, index[6])
+ index[7] <- gsub("[0-9].[0-9][0-9].[0-9][0-9]", version, index[7])
+ writeLines(index, "docs/index.md")
+ shell: Rscript {0}
+
+# Commit changes to the version in index.md to the repository
+ - name: Commit changes made to index.md
+ uses: EndBug/add-and-commit@v9
+ with:
+ add: 'docs/index.md'
+ message: 'update index version'
+
+ # Create Release
+ - name: Create Release
+ id: create_release
+ uses: actions/create-release@v1
+ with:
+ tag_name: ${{ steps.version.outputs.version }}
+ release_name: ${{ steps.version.outputs.version }} Docs
+ draft: false
+ prerelease: false
+
+ # Add html as artifact for release
+ # Could change link in index for html to asset location so don't need to add html to docs folder
+ - name: Upload release artifact - html manual
+ uses: actions/upload-release-asset@v1
+ with:
+ upload_url: ${{ steps.create_release.outputs.upload_url }}
+ asset_path: ./SS330_User_Manual.html
+ asset_name: SS330_User_Manual.html
+ asset_content_type: application/html
+
+ # Add pdf as artifact for release
+ - name: Upload release artifact 2
+ uses: actions/upload-release-asset@v1
+ with:
+ upload_url: ${{ steps.create_release.outputs.upload_url }}
+ asset_path: ./SS330_User_Manual.pdf
+ asset_name: SS330_User_Manual.pdf
+ asset_content_type: application/pdf
+
+# Render github pages
+ - name: render the rmd files
+ run: |
+ rmarkdown::render("User_Guides/ss_model_tips/ss_model_tips.Rmd", output_format = c("html_document", "pdf_document"), output_dir = "docs")
+ rmarkdown::render("User_Guides/getting_started/Getting_Started_SS.Rmd", output_format = c("html_document", "pdf_document"), output_dir = "docs")
+ shell: Rscript {0}
+
+ - name: Deploy to GitHub pages
+ uses: JamesIves/github-pages-deploy-action@4.1.4
+ with:
+ branch: gh-pages
+ folder: docs/
\ No newline at end of file
From d3334722604691915ba16133fdd99d5dcc2df695 Mon Sep 17 00:00:00 2001
From: e-gugliotti-NOAA
Date: Wed, 23 Aug 2023 12:05:43 -0400
Subject: [PATCH 03/13] fix with using just _release file
---
.github/workflows/release.yml | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 19fc6d7f..778a4cef 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,6 +1,8 @@
name: Release
on:
+ # push:
+ # branches: [auto-release-workflows]
workflow_dispatch:
jobs:
@@ -71,11 +73,11 @@ jobs:
# HTML Portion
- name: Convert tex to html
- run: pandoc SS330_User_Manual.tex -s -o SS330_User_Manual.html --toc --self-contained --mathjax --default-image-extension=png --number-sections --citeproc --variable linkcolor=#0033CC
+ run: pandoc SS330_User_Manual.tex -s -o SS330_User_Manual_release.html --toc --self-contained --mathjax --default-image-extension=png --number-sections --citeproc --variable linkcolor=#0033CC
# Note: for the following R code, may be a single command to deal with the double header issue before rendering.
- name: Edit html to improve formatting
run: |
- html_txt <- readLines("SS330_User_Manual.html")
+ html_txt <- readLines("SS330_User_Manual_release.html")
#read html snippits to add
html_snips <- readLines("html_usermanual_snippets.html")
# remove inline style
@@ -172,7 +174,7 @@ jobs:
html_txt <- append(html_txt,
'17 References ',
after = where_add)
- writeLines(html_txt, "SS330_User_Manual.html")
+ writeLines(html_txt, "SS330_User_Manual_release.html")
writeLines(html_txt, "docs/SS330_User_Manual_release.html")
shell: Rscript {0}
@@ -197,6 +199,11 @@ jobs:
#args: --lua-filter=tagged-filter.lua
latexmk_use_lualatex: true
+# Change name of pdf file to include "_release"
+ - name: Add _release to pdf file name
+ run: |
+ mv SS330_User_Manual.pdf SS330_User_Manual_release.pdf
+
# Update the version in index.md
- name: Update version in index.md
run: |
@@ -231,17 +238,17 @@ jobs:
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: ./SS330_User_Manual.html
- asset_name: SS330_User_Manual.html
+ asset_path: ./SS330_User_Manual_release.html
+ asset_name: SS330_User_Manual_release.html
asset_content_type: application/html
# Add pdf as artifact for release
- - name: Upload release artifact 2
+ - name: Upload release artifact - pdf manual
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: ./SS330_User_Manual.pdf
- asset_name: SS330_User_Manual.pdf
+ asset_path: ./SS330_User_Manual_release.pdf
+ asset_name: SS330_User_Manual_release.pdf
asset_content_type: application/pdf
# Render github pages
From 9c93ca1fe21a68df95ba01fecbbe6e247386add6 Mon Sep 17 00:00:00 2001
From: e-gugliotti-NOAA
Date: Mon, 16 Oct 2023 11:58:59 -0400
Subject: [PATCH 04/13] update ss to ss3
---
.github/workflows/release.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 778a4cef..c0477a09 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -254,8 +254,8 @@ jobs:
# Render github pages
- name: render the rmd files
run: |
- rmarkdown::render("User_Guides/ss_model_tips/ss_model_tips.Rmd", output_format = c("html_document", "pdf_document"), output_dir = "docs")
- rmarkdown::render("User_Guides/getting_started/Getting_Started_SS.Rmd", output_format = c("html_document", "pdf_document"), output_dir = "docs")
+ rmarkdown::render("User_Guides/ss3_model_tips/ss3_model_tips.Rmd", output_format = c("html_document", "pdf_document"), output_dir = "docs")
+ rmarkdown::render("User_Guides/getting_started/Getting_Started_SS3.Rmd", output_format = c("html_document", "pdf_document"), output_dir = "docs")
shell: Rscript {0}
- name: Deploy to GitHub pages
From 8f0d4613a013db873f464ee5061b2e9df042b3f7 Mon Sep 17 00:00:00 2001
From: e-gugliotti-NOAA
Date: Mon, 16 Oct 2023 12:00:07 -0400
Subject: [PATCH 05/13] remove fetch-depth
---
.github/workflows/release.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index c0477a09..bf43da95 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -17,7 +17,6 @@ jobs:
steps:
- name: Setup Git repository
uses: actions/checkout@v3
- fetch-depth: 0
- name: Update Ubuntu packages
run: sudo apt-get update
From e5de798a383150c589d45c1d93140be07484aa97 Mon Sep 17 00:00:00 2001
From: e-gugliotti-NOAA
Date: Wed, 18 Oct 2023 15:19:53 -0400
Subject: [PATCH 06/13] checkoutv4; gsub changes
---
.github/workflows/build-ss3-manual-html.yml | 2 +-
.github/workflows/build-ss3-manual-pdf.yml | 2 +-
.github/workflows/deploy-ss3-docs.yml | 2 +-
.github/workflows/release.yml | 9 ++++-----
4 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/build-ss3-manual-html.yml b/.github/workflows/build-ss3-manual-html.yml
index c0611833..12a9abba 100644
--- a/.github/workflows/build-ss3-manual-html.yml
+++ b/.github/workflows/build-ss3-manual-html.yml
@@ -26,7 +26,7 @@ jobs:
RSPM: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"
steps:
- name: Set up Git repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
diff --git a/.github/workflows/build-ss3-manual-pdf.yml b/.github/workflows/build-ss3-manual-pdf.yml
index 41552585..094f2de9 100644
--- a/.github/workflows/build-ss3-manual-pdf.yml
+++ b/.github/workflows/build-ss3-manual-pdf.yml
@@ -23,7 +23,7 @@ jobs:
steps:
- name: Set up Git repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
diff --git a/.github/workflows/deploy-ss3-docs.yml b/.github/workflows/deploy-ss3-docs.yml
index 50bf5111..91375e90 100644
--- a/.github/workflows/deploy-ss3-docs.yml
+++ b/.github/workflows/deploy-ss3-docs.yml
@@ -18,7 +18,7 @@ jobs:
RSPM: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"
steps:
- name: Set up Git repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Set up R
uses: r-lib/actions/setup-r@v2
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index bf43da95..18688f71 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -16,7 +16,7 @@ jobs:
steps:
- name: Setup Git repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Update Ubuntu packages
run: sudo apt-get update
@@ -203,14 +203,13 @@ jobs:
run: |
mv SS330_User_Manual.pdf SS330_User_Manual_release.pdf
-# Update the version in index.md
+# Update the version in index.md [this will need to change when website is updated]
- name: Update version in index.md
run: |
version <- readLines("version.txt", encoding = "UTF-8")
- index <- readLines("docs/index.md", encoding = "UTF-8")
+ index <- readLines("docs/index.md", encoding = "UTF-8")
version <- gsub("v", "", version)
- index[6] <- gsub("[0-9].[0-9][0-9].[0-9][0-9]", version, index[6])
- index[7] <- gsub("[0-9].[0-9][0-9].[0-9][0-9]", version, index[7])
+ index <- gsub("v[0-9]\\.[0-9]{2}\\.[0-9]{2}", version, index)
writeLines(index, "docs/index.md")
shell: Rscript {0}
From 442e0919b5511ceb3a39320a9d1d73ec62dcc757 Mon Sep 17 00:00:00 2001
From: Elizabeth Gugliotti
Date: Thu, 26 Oct 2023 11:50:42 -0400
Subject: [PATCH 07/13] Update release.yml
remove "v" from version format;
remove gsub() that remove the "v" from the version
remove latex version
update semantic version to 5.3.0
---
.github/workflows/release.yml | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 18688f71..b2485d53 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -28,8 +28,6 @@ jobs:
- name: Setup pandoc
uses: r-lib/actions/setup-pandoc@v2
- with:
- pandoc-version: '2.14.0.3'
- name: Install rmarkdown
run: install.packages("rmarkdown")
@@ -38,10 +36,10 @@ jobs:
# Get previous version and then create the next version
- name: Application Version
id: version
- uses: paulhatch/semantic-version@v5.0.2
+ uses: paulhatch/semantic-version@v5.3.0
with:
tag_prefix: "v"
- version_format: "v${major}.${minor}.${patch}"
+ version_format: "${major}.${minor}.${patch}"
# Create version.txt to use when changing the version in the index.md
- name: Create version.txt
@@ -51,7 +49,6 @@ jobs:
- name: Update version and date in manual
run: |
version <- readLines("version.txt", encoding = "UTF-8")
- version <- gsub("v", "", version)
manual_tex <- readLines("SS330_User_Manual.tex")
manual_tex[grep("Version", manual_tex)] <- gsub("[0-9].[0-9][0-9].[0-9][0-9]", version, manual_tex[grep("Version", manual_tex)])
date_line <- manual_tex[grep("date[{]", manual_tex)]
@@ -208,7 +205,6 @@ jobs:
run: |
version <- readLines("version.txt", encoding = "UTF-8")
index <- readLines("docs/index.md", encoding = "UTF-8")
- version <- gsub("v", "", version)
index <- gsub("v[0-9]\\.[0-9]{2}\\.[0-9]{2}", version, index)
writeLines(index, "docs/index.md")
shell: Rscript {0}
@@ -260,4 +256,4 @@ jobs:
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
- folder: docs/
\ No newline at end of file
+ folder: docs/
From 19cce8b581950eba2d7ff37001ec2bd69ab4d08f Mon Sep 17 00:00:00 2001
From: e-gugliotti-NOAA
Date: Thu, 26 Oct 2023 12:05:36 -0400
Subject: [PATCH 08/13] update gsub commands for updating version and date
---
.github/workflows/release.yml | 32 ++++++++++++++++++++++----------
1 file changed, 22 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index b2485d53..66e1ebee 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -50,22 +50,34 @@ jobs:
run: |
version <- readLines("version.txt", encoding = "UTF-8")
manual_tex <- readLines("SS330_User_Manual.tex")
- manual_tex[grep("Version", manual_tex)] <- gsub("[0-9].[0-9][0-9].[0-9][0-9]", version, manual_tex[grep("Version", manual_tex)])
- date_line <- manual_tex[grep("date[{]", manual_tex)]
- todays_month <- format(Sys.Date(), "%B")
- todays_day <- format(Sys.Date(), "%d")
- todays_year <- format(Sys.Date(), "%Y")
- todays_date <- paste0("{", todays_month, " ", todays_day, ", ", todays_year, "}")
- date_line <- gsub("\\{[^{}]*\\}", todays_date, date_line)
- manual_tex[grep("date[{]", manual_tex)]<- date_line
- writeLines(manual_tex, "SS330_User_Manual.tex")
+ manual_tex[grep("Version", manual_tex)] <- gsub(
+ pattern = "[0-9].[0-9][0-9].[0-9][0-9]",
+ replacement = version,
+ x = manual_tex[grep(pattern = "Version", x = manual_tex)]
+ )
+ date_line <- grep(pattern = "date\\{", x = manual_tex)
+ todays_date <- format(x = Sys.Date(), "%B %d, %Y")
+ manual_tex[date_line] <- gsub(
+ pattern = "\\{[A-Za-z0-9, ]+",
+ replacement = paste0("{", todays_date),
+ x = manual_tex[date_line]
+
+ # manual_tex[grep("Version", manual_tex)] <- gsub("[0-9].[0-9][0-9].[0-9][0-9]", version, manual_tex[grep("Version", manual_tex)])
+ # date_line <- manual_tex[grep("date[{]", manual_tex)]
+ # todays_month <- format(Sys.Date(), "%B")
+ # todays_day <- format(Sys.Date(), "%d")
+ # todays_year <- format(Sys.Date(), "%Y")
+ # todays_date <- paste0("{", todays_month, " ", todays_day, ", ", todays_year, "}")
+ # date_line <- gsub("\\{[^{}]*\\}", todays_date, date_line)
+ # manual_tex[grep("date[{]", manual_tex)]<- date_line
+ # writeLines(manual_tex, "SS330_User_Manual.tex")
shell: Rscript {0}
- name: Commit date and version changes in SS330_User_Manual.tex
uses: EndBug/add-and-commit@v9
with:
add: './docs/SS330_User_Manual.tex'
- message: 'update version and date in manual'
+ message: 'release: update version and date in manual'
# HTML Portion
- name: Convert tex to html
From 5f92a37ea576ddb450b894c8ab392c09e473739b Mon Sep 17 00:00:00 2001
From: e-gugliotti-NOAA
Date: Thu, 26 Oct 2023 12:06:02 -0400
Subject: [PATCH 09/13] remove previous version
---
.github/workflows/release.yml | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 66e1ebee..6cd60c50 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -61,16 +61,6 @@ jobs:
pattern = "\\{[A-Za-z0-9, ]+",
replacement = paste0("{", todays_date),
x = manual_tex[date_line]
-
- # manual_tex[grep("Version", manual_tex)] <- gsub("[0-9].[0-9][0-9].[0-9][0-9]", version, manual_tex[grep("Version", manual_tex)])
- # date_line <- manual_tex[grep("date[{]", manual_tex)]
- # todays_month <- format(Sys.Date(), "%B")
- # todays_day <- format(Sys.Date(), "%d")
- # todays_year <- format(Sys.Date(), "%Y")
- # todays_date <- paste0("{", todays_month, " ", todays_day, ", ", todays_year, "}")
- # date_line <- gsub("\\{[^{}]*\\}", todays_date, date_line)
- # manual_tex[grep("date[{]", manual_tex)]<- date_line
- # writeLines(manual_tex, "SS330_User_Manual.tex")
shell: Rscript {0}
- name: Commit date and version changes in SS330_User_Manual.tex
From 5f0bb122b432ed301f6d2697335d41564a2f0218 Mon Sep 17 00:00:00 2001
From: e-gugliotti-NOAA
Date: Thu, 26 Oct 2023 12:07:03 -0400
Subject: [PATCH 10/13] write lines command got deleted, add back in
---
.github/workflows/release.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 6cd60c50..b16a602e 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -61,6 +61,7 @@ jobs:
pattern = "\\{[A-Za-z0-9, ]+",
replacement = paste0("{", todays_date),
x = manual_tex[date_line]
+ writeLines(text = manual_tex, con = "SS330_User_Manual.tex")
shell: Rscript {0}
- name: Commit date and version changes in SS330_User_Manual.tex
From f1b166fcee3bb9617df3f9590b2fd08aa90143d1 Mon Sep 17 00:00:00 2001
From: e-gugliotti-NOAA
Date: Fri, 27 Oct 2023 09:50:54 -0400
Subject: [PATCH 11/13] use R code for release & html rather than in yml
---
.github/workflows/build-ss3-manual-html.yml | 213 +++++++++++---------
.github/workflows/release.yml | 116 ++---------
Rcode/edit_html_improve_formatting.R | 110 ++++++++++
3 files changed, 238 insertions(+), 201 deletions(-)
create mode 100644 Rcode/edit_html_improve_formatting.R
diff --git a/.github/workflows/build-ss3-manual-html.yml b/.github/workflows/build-ss3-manual-html.yml
index 12a9abba..6be6e2cc 100644
--- a/.github/workflows/build-ss3-manual-html.yml
+++ b/.github/workflows/build-ss3-manual-html.yml
@@ -46,108 +46,123 @@ jobs:
- name: Convert tex to html
run: pandoc SS330_User_Manual.tex -s -o SS330_User_Manual.html --toc --self-contained --mathjax --default-image-extension=png --number-sections --citeproc --variable linkcolor=#0033CC
# Note: for the following R code, may be a single command to deal with the double header issue before rendering.
- - name: Edit html to improve formatting
+
+ # Create user_manual_name.txt to user for the name of the html file
+ # (will not have release here but will for the release.yml)
+ - name: Create user_manual_name.txt
run: |
- html_txt <- readLines("SS330_User_Manual.html")
- #read html snippits to add
- html_snips <- readLines("html_usermanual_snippets.html")
- # remove inline style
- style_sec <- grep("style>", html_txt)
- html_txt <- html_txt[-(style_sec[1]:style_sec[2])]
- # add in the the navbar
- navbar_snip <- grep("div", html_snips)
- navbar_snip <- html_snips[navbar_snip[1]:navbar_snip[2]]
- html_txt <- append(html_txt, navbar_snip, after = grep("_add:nnnCatalog Lang (enUS) ",
- "", html_txt, fixed = TRUE)
- # add link to css
- css_snip <- grep(" ", html_txt))
- # Add styling to tables add 1 because first col is on next row
- first_lines <- grep("^",
- "",
- tmp_lines)
- html_txt[first_lines] <- tmp_lines
- # remove Typical Value double header
- label <- grep(">Typical Value<", html_txt, fixed = TRUE)
- diff_label <- diff(label)
- to_rm <- which(diff_label <10)
- # one to get rid of is test
- to_rm_lines <- label[to_rm+1]
- for (i in to_rm_lines) {
- start <- grep(" Value<", html_txt, fixed = TRUE)
- diff_label <- diff(label)
- to_rm <- which(diff_label <10)
- to_rm_lines <- label[to_rm+1]
- for (i in to_rm_lines) {
- start <- grep(" LO<", html_txt, fixed = TRUE)
- diff_label <- diff(label)
- to_rm <- which(diff_label < 20)
- to_rm_lines <- label[to_rm+1]
- for (i in to_rm_lines) {
- start <- grep(" N Parameters<", html_txt, fixed = T)
- diff_label <- diff(label)
- to_rm <- which(diff_label == 5)
- to_rm_lines <- label[to_rm+1]
- for (i in to_rm_lines) {
- start <- grep(" ',
- html_txt, fixed = TRUE)
- html_txt <- append(html_txt,
- "Table of Contents ",
- after = where_add[1])
- # Add title to references
- where_add <- (grep("references csl-bib-body hanging-indent",
- html_txt, fixed = TRUE) - 1)
- html_txt <- append(html_txt,
- ' References ',
- after = where_add)
- # Add references to table of contents
- where_add <- grep("", html_txt, fixed = TRUE)-2
- html_txt <- append(html_txt,
- '17 References ',
- after = where_add)
- writeLines(html_txt, "SS330_User_Manual.html")
+ name_txt <- file("user_manual_name.txt")
+ writeLines("SS330_User_Manual.html", name_txt)
+ close(name_txt)
shell: Rscript {0}
+ - name: Run R script to create html
+ run: |
+ source("Rcode/edit_html_improve_formatting.R")
+ shell: Rscript {0}
+
+ # - name: Edit html to improve formatting
+ # run: |
+ # html_txt <- readLines("SS330_User_Manual.html")
+ # #read html snippits to add
+ # html_snips <- readLines("html_usermanual_snippets.html")
+ # # remove inline style
+ # style_sec <- grep("style>", html_txt)
+ # html_txt <- html_txt[-(style_sec[1]:style_sec[2])]
+ # # add in the the navbar
+ # navbar_snip <- grep("div", html_snips)
+ # navbar_snip <- html_snips[navbar_snip[1]:navbar_snip[2]]
+ # html_txt <- append(html_txt, navbar_snip, after = grep("_add:nnnCatalog Lang (enUS) ",
+ # "", html_txt, fixed = TRUE)
+ # # add link to css
+ # css_snip <- grep(" ", html_txt))
+ # # Add styling to tables add 1 because first col is on next row
+ # first_lines <- grep("^ ",
+ # "",
+ # tmp_lines)
+ # html_txt[first_lines] <- tmp_lines
+ # # remove Typical Value double header
+ # label <- grep(">Typical Value<", html_txt, fixed = TRUE)
+ # diff_label <- diff(label)
+ # to_rm <- which(diff_label <10)
+ # # one to get rid of is test
+ # to_rm_lines <- label[to_rm+1]
+ # for (i in to_rm_lines) {
+ # start <- grep(" Value<", html_txt, fixed = TRUE)
+ # diff_label <- diff(label)
+ # to_rm <- which(diff_label <10)
+ # to_rm_lines <- label[to_rm+1]
+ # for (i in to_rm_lines) {
+ # start <- grep(" LO<", html_txt, fixed = TRUE)
+ # diff_label <- diff(label)
+ # to_rm <- which(diff_label < 20)
+ # to_rm_lines <- label[to_rm+1]
+ # for (i in to_rm_lines) {
+ # start <- grep(" N Parameters<", html_txt, fixed = T)
+ # diff_label <- diff(label)
+ # to_rm <- which(diff_label == 5)
+ # to_rm_lines <- label[to_rm+1]
+ # for (i in to_rm_lines) {
+ # start <- grep(" ',
+ # html_txt, fixed = TRUE)
+ # html_txt <- append(html_txt,
+ # "Table of Contents ",
+ # after = where_add[1])
+ # # Add title to references
+ # where_add <- (grep("references csl-bib-body hanging-indent",
+ # html_txt, fixed = TRUE) - 1)
+ # html_txt <- append(html_txt,
+ # ' References ',
+ # after = where_add)
+ # # Add references to table of contents
+ # where_add <- grep("", html_txt, fixed = TRUE)-2
+ # html_txt <- append(html_txt,
+ # '17 References ',
+ # after = where_add)
+ # writeLines(html_txt, "SS330_User_Manual.html")
+ # shell: Rscript {0}
+
- name: upload html file as artifact
uses: actions/upload-artifact@v3
with:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index b16a602e..95dd5508 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -68,114 +68,26 @@ jobs:
uses: EndBug/add-and-commit@v9
with:
add: './docs/SS330_User_Manual.tex'
- message: 'release: update version and date in manual'
+ message: 'release: update version and date in manual'
+
# HTML Portion
- name: Convert tex to html
run: pandoc SS330_User_Manual.tex -s -o SS330_User_Manual_release.html --toc --self-contained --mathjax --default-image-extension=png --number-sections --citeproc --variable linkcolor=#0033CC
# Note: for the following R code, may be a single command to deal with the double header issue before rendering.
- - name: Edit html to improve formatting
+# Create user_manual_name.txt to user for the name of the html file
+# (will be release here but will not have release for the build-ss3-manual.yml)
+ - name: Create user_manual_name.txt
+ run: |
+ name_txt <- file("user_manual_name.txt")
+ writeLines("SS330_User_Manual_release.html", name_txt)
+ close(name_txt)
+ shell: Rscript {0}
+
+ - name: Run R script to create html
run: |
- html_txt <- readLines("SS330_User_Manual_release.html")
- #read html snippits to add
- html_snips <- readLines("html_usermanual_snippets.html")
- # remove inline style
- style_sec <- grep("style>", html_txt)
- html_txt <- html_txt[-(style_sec[1]:style_sec[2])]
- # add in the the navbar
- navbar_snip <- grep("div", html_snips)
- navbar_snip <- html_snips[navbar_snip[1]:navbar_snip[2]]
- html_txt <- append(html_txt, navbar_snip, after = grep("_add:nnnCatalog Lang (enUS) ",
- "", html_txt, fixed = TRUE)
- # add link to css
- css_snip <- grep(" ", html_txt))
- # Add styling to tables add 1 because first col is on next row
- first_lines <- grep("^ ",
- "",
- tmp_lines)
- html_txt[first_lines] <- tmp_lines
- # remove Typical Value double header
- label <- grep(">Typical Value<", html_txt, fixed = TRUE)
- diff_label <- diff(label)
- to_rm <- which(diff_label <10)
- # one to get rid of is test
- to_rm_lines <- label[to_rm+1]
- for (i in to_rm_lines) {
- start <- grep(" Value<", html_txt, fixed = TRUE)
- diff_label <- diff(label)
- to_rm <- which(diff_label <10)
- to_rm_lines <- label[to_rm+1]
- for (i in to_rm_lines) {
- start <- grep(" LO<", html_txt, fixed = TRUE)
- diff_label <- diff(label)
- to_rm <- which(diff_label < 20)
- to_rm_lines <- label[to_rm+1]
- for (i in to_rm_lines) {
- start <- grep(" N Parameters<", html_txt, fixed = T)
- diff_label <- diff(label)
- to_rm <- which(diff_label == 5)
- to_rm_lines <- label[to_rm+1]
- for (i in to_rm_lines) {
- start <- grep(" ',
- html_txt, fixed = TRUE)
- html_txt <- append(html_txt,
- "Table of Contents ",
- after = where_add[1])
- # Add title to references
- where_add <- (grep("references csl-bib-body hanging-indent",
- html_txt, fixed = TRUE) - 1)
- html_txt <- append(html_txt,
- ' References ',
- after = where_add)
- # Add references to table of contents
- where_add <- grep("", html_txt, fixed = TRUE)-2
- html_txt <- append(html_txt,
- '17 References ',
- after = where_add)
- writeLines(html_txt, "SS330_User_Manual_release.html")
- writeLines(html_txt, "docs/SS330_User_Manual_release.html")
- shell: Rscript {0}
+ source("Rcode/edit_html_improve_formatting.R")
+ shell: Rscript {0}
- name: Commit html of manual to docs folder
uses: EndBug/add-and-commit@v9
diff --git a/Rcode/edit_html_improve_formatting.R b/Rcode/edit_html_improve_formatting.R
new file mode 100644
index 00000000..53e98980
--- /dev/null
+++ b/Rcode/edit_html_improve_formatting.R
@@ -0,0 +1,110 @@
+# Edit html to improve formatting
+# Used in the build-ss3-manual-html.yml workflow and the
+# release.yml workflow
+
+user_manual_name <- readLines("user_manual_name.txt", warn = FALSE)
+
+html_txt <- readLines(user_manual_name)
+# html_txt <- readLines("SS330_User_Manual_release.html")
+
+#read html snippits to add
+html_snips <- readLines("html_usermanual_snippets.html")
+# remove inline style
+style_sec <- grep("style>", html_txt)
+html_txt <- html_txt[-(style_sec[1]:style_sec[2])]
+# add in the the navbar
+navbar_snip <- grep("div", html_snips)
+navbar_snip <- html_snips[navbar_snip[1]:navbar_snip[2]]
+html_txt <- append(html_txt, navbar_snip, after = grep("_add:nnnCatalog Lang (enUS) ",
+ "", html_txt, fixed = TRUE)
+# add link to css
+css_snip <- grep(" ", html_txt))
+# Add styling to tables add 1 because first col is on next row
+first_lines <- grep("^ ",
+ "",
+ tmp_lines)
+html_txt[first_lines] <- tmp_lines
+# remove Typical Value double header
+label <- grep(">Typical Value<", html_txt, fixed = TRUE)
+diff_label <- diff(label)
+to_rm <- which(diff_label <10)
+# one to get rid of is test
+to_rm_lines <- label[to_rm+1]
+for (i in to_rm_lines) {
+ start <- grep(" Value<", html_txt, fixed = TRUE)
+diff_label <- diff(label)
+to_rm <- which(diff_label <10)
+to_rm_lines <- label[to_rm+1]
+for (i in to_rm_lines) {
+ start <- grep(" LO<", html_txt, fixed = TRUE)
+diff_label <- diff(label)
+to_rm <- which(diff_label < 20)
+to_rm_lines <- label[to_rm+1]
+for (i in to_rm_lines) {
+ start <- grep(" N Parameters<", html_txt, fixed = T)
+diff_label <- diff(label)
+to_rm <- which(diff_label == 5)
+to_rm_lines <- label[to_rm+1]
+for (i in to_rm_lines) {
+ start <- grep(" ',
+ html_txt, fixed = TRUE)
+html_txt <- append(html_txt,
+ "Table of Contents ",
+ after = where_add[1])
+# Add title to references
+where_add <- (grep("references csl-bib-body hanging-indent",
+ html_txt, fixed = TRUE) - 1)
+html_txt <- append(html_txt,
+ ' References ',
+ after = where_add)
+# Add references to table of contents
+where_add <- grep("", html_txt, fixed = TRUE)-2
+html_txt <- append(html_txt,
+ '17 References ',
+ after = where_add)
+
+writeLines(html_txt, user_manual_name)
+writeLines(html_txt, user_manual_name)
+# writeLines(html_txt, "SS330_User_Manual_release.html")
+# writeLines(html_txt, "docs/SS330_User_Manual_release.html")
\ No newline at end of file
From 8467e195da2206978ef4332706990dd333c89654 Mon Sep 17 00:00:00 2001
From: e-gugliotti-NOAA
Date: Fri, 27 Oct 2023 09:52:02 -0400
Subject: [PATCH 12/13] remove R code from html yml
---
.github/workflows/build-ss3-manual-html.yml | 102 --------------------
1 file changed, 102 deletions(-)
diff --git a/.github/workflows/build-ss3-manual-html.yml b/.github/workflows/build-ss3-manual-html.yml
index 6be6e2cc..2e9fa1d7 100644
--- a/.github/workflows/build-ss3-manual-html.yml
+++ b/.github/workflows/build-ss3-manual-html.yml
@@ -61,108 +61,6 @@ jobs:
source("Rcode/edit_html_improve_formatting.R")
shell: Rscript {0}
- # - name: Edit html to improve formatting
- # run: |
- # html_txt <- readLines("SS330_User_Manual.html")
- # #read html snippits to add
- # html_snips <- readLines("html_usermanual_snippets.html")
- # # remove inline style
- # style_sec <- grep("style>", html_txt)
- # html_txt <- html_txt[-(style_sec[1]:style_sec[2])]
- # # add in the the navbar
- # navbar_snip <- grep("div", html_snips)
- # navbar_snip <- html_snips[navbar_snip[1]:navbar_snip[2]]
- # html_txt <- append(html_txt, navbar_snip, after = grep("_add:nnnCatalog Lang (enUS) ",
- # "", html_txt, fixed = TRUE)
- # # add link to css
- # css_snip <- grep(" ", html_txt))
- # # Add styling to tables add 1 because first col is on next row
- # first_lines <- grep("^",
- # "",
- # tmp_lines)
- # html_txt[first_lines] <- tmp_lines
- # # remove Typical Value double header
- # label <- grep(">Typical Value<", html_txt, fixed = TRUE)
- # diff_label <- diff(label)
- # to_rm <- which(diff_label <10)
- # # one to get rid of is test
- # to_rm_lines <- label[to_rm+1]
- # for (i in to_rm_lines) {
- # start <- grep(" Value<", html_txt, fixed = TRUE)
- # diff_label <- diff(label)
- # to_rm <- which(diff_label <10)
- # to_rm_lines <- label[to_rm+1]
- # for (i in to_rm_lines) {
- # start <- grep(" LO<", html_txt, fixed = TRUE)
- # diff_label <- diff(label)
- # to_rm <- which(diff_label < 20)
- # to_rm_lines <- label[to_rm+1]
- # for (i in to_rm_lines) {
- # start <- grep(" N Parameters<", html_txt, fixed = T)
- # diff_label <- diff(label)
- # to_rm <- which(diff_label == 5)
- # to_rm_lines <- label[to_rm+1]
- # for (i in to_rm_lines) {
- # start <- grep(" ',
- # html_txt, fixed = TRUE)
- # html_txt <- append(html_txt,
- # "Table of Contents ",
- # after = where_add[1])
- # # Add title to references
- # where_add <- (grep("references csl-bib-body hanging-indent",
- # html_txt, fixed = TRUE) - 1)
- # html_txt <- append(html_txt,
- # ' References ',
- # after = where_add)
- # # Add references to table of contents
- # where_add <- grep("", html_txt, fixed = TRUE)-2
- # html_txt <- append(html_txt,
- # '17 References ',
- # after = where_add)
- # writeLines(html_txt, "SS330_User_Manual.html")
- # shell: Rscript {0}
-
- name: upload html file as artifact
uses: actions/upload-artifact@v3
with:
From f314a82137d9d4bb9e07860b7fa7816f313adf04 Mon Sep 17 00:00:00 2001
From: e-gugliotti-NOAA
Date: Fri, 27 Oct 2023 09:58:29 -0400
Subject: [PATCH 13/13] use ubuntu-latest
---
.github/workflows/build-ss3-manual-html.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/build-ss3-manual-html.yml b/.github/workflows/build-ss3-manual-html.yml
index 2e9fa1d7..e860a120 100644
--- a/.github/workflows/build-ss3-manual-html.yml
+++ b/.github/workflows/build-ss3-manual-html.yml
@@ -20,7 +20,7 @@ on:
jobs:
build-html:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-latest
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"