Skip to content

Commit

Permalink
Merge pull request #504 from jku/use-pandoc
Browse files Browse the repository at this point in the history
actions: Switch status html rendering to pandoc
  • Loading branch information
jku authored Jan 13, 2025
2 parents 2521311 + 7fdb741 commit a52a637
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 6 deletions.
20 changes: 14 additions & 6 deletions actions/upload-repository/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ runs:
echo "::group::Install tuf-on-ci"
ROOT=$GITHUB_ACTION_PATH/../..
pip install -c $ROOT/action-constraints.txt $ROOT/repo/
cp $GITHUB_ACTION_PATH/index.css .
echo "::endgroup::"
shell: bash
Expand All @@ -45,27 +46,34 @@ runs:
find build -type f | xargs ls -lh
shell: bash

- uses: actions/jekyll-build-pages@44a6e6beabd48582f863aeeb6cb2151cc1716697 # 1.0.13
- name: Render repository state in HTML
uses: docker://pandoc/core:3.5.0@sha256:771842ce6f661785e0e12931f82ea64046d70fa48ea5cff480492d79ab3b8ff1
with:
source: build
destination: build-jekyll
args: >-
--metadata title="TUF Repository state"
--variable title=""
--standalone
--embed-resources
--css index.css
--output build/${{inputs.metadata_path}}/index.html
build/${{inputs.metadata_path}}/index.md
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: inputs.gh_pages != 'true'
with:
name: metadata
path: build-jekyll/${{inputs.metadata_path}}/*
path: build/${{inputs.metadata_path}}/*

- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: inputs.gh_pages != 'true'
with:
name: artifacts
path: build-jekyll/${{inputs.artifacts_path}}/*
path: build/${{inputs.artifacts_path}}/*

- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
if: inputs.gh_pages == 'true'
with:
path: build-jekyll/
path: build/

- id: status-summary
shell: bash
Expand Down
46 changes: 46 additions & 0 deletions actions/upload-repository/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
body {
color: #24292e;
line-height: 1.5;
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;
font-size: 16px;
line-height: 1.5;
word-wrap: break-word;
}

a {
background-color: transparent;
color: #0366d6;
text-decoration: none;
}

a:hover {
text-decoration: underline;
}

table {
margin-bottom: 16px;
border-collapse: collapse;
border-spacing: 0;
display: block;
overflow: auto;
width: 100%;
}

table th {
font-weight: 600;
}

table td,
table th {
border: 1px solid #dfe2e5;
padding: 6px 13px;
}

table tr {
background-color: #fff;
border-top: 1px solid #c6cbd1;
}

table tr:nth-child(2n) {
background-color: #f6f8fa;
}

0 comments on commit a52a637

Please sign in to comment.