Skip to content

Commit

Permalink
fix with using just _release file
Browse files Browse the repository at this point in the history
  • Loading branch information
e-perl-NOAA committed Aug 23, 2023
1 parent b4021e1 commit d333472
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Release

on:
# push:
# branches: [auto-release-workflows]
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -172,7 +174,7 @@ jobs:
html_txt <- append(html_txt,
'<li><a href="#sec:references"><span class="toc-section-number">17</span> References</a></li>',
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}

Expand All @@ -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: |
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d333472

Please sign in to comment.