Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 63 additions & 36 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,80 @@ name: build-documents

on:
push:
branches: [ master ]
branches: [ master, main ]
pull_request:
types: [opened, synchronize, ready_for_review]

jobs:
build-docker:
runs-on: ubuntu-latest
container: docker://metanorma/mn:1.4.12
container:
image: ghcr.io/metanorma/metanorma-nist:latest
credentials:
username: metanorma-ci
password: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Install gems from local Gemfile
run: |
curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/gemfile-to-bundle-add.sh | bash
- name: Build document in the Metanorma container
env:
LC_ALL: C.UTF-8
LANG: C.UTF-8
LANGUAGE: C.UTF-8

- uses: actions/cache@v2
with:
path: /config/fonts
key: metanorma-nist-fonts
restore-keys: metanorma-nist-fonts

- name: Cache built documents
uses: actions/cache@v2
with:
path: site/
key: ${{ hashFiles('metanorma.yml') }}-${{ hashFiles('src/*.adoc') }}

- uses: metanorma/metanorma-build-scripts/gh-rubygems-setup-action@main
with:
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}

- uses: metanorma/metanorma-build-scripts/docker-gem-install@main

- uses: actions-mn/cli/site-gen@main
with:
agree-to-terms: true

- name: Build NIST site on GitHub Pages
run: |
make clean all publish
working-directory: ./src
- uses: actions/upload-artifact@master
rm -f site/index.html
find site/documents/src \( -name '*.html' -or -name '*.pdf' -or \
-name '*.rxl' -or -name '*.xml' \) -exec mv \{} site/ \;
rm -rf site/documents
cp _config.yml site/
cp -a _includes site/
cp README.md site/index.md

- uses: actions/upload-artifact@v2
with:
name: documents
path: ./src/documents
name: site
path: site

deploy-gh-pages:
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build-docker
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@v1
with:
name: documents
- name: Deploy to GH Pages
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.GH_DEPLOY_KEY }}
publish_dir: documents
publish_branch: nist-pages
force_orphan: true
enable_jekyll: true
user_name: ${{ github.actor }}
user_email: ${{ format('{0}@users.noreply.github.com', github.actor) }}
commit_message: "${{ format('Deploy to GitHub Pages: {0}', github.sha) }}"
- uses: kolpav/purge-artifacts-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
expire-in: 0
- uses: actions/checkout@v2

- uses: actions/download-artifact@v1
with:
name: site

- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ github.token }}
publish_dir: ./site
publish_branch: nist-pages
force_orphan: true
enable_jekyll: true
user_name: ${{ github.actor }}
user_email: ${{ format('{0}@users.noreply.github.com', github.actor) }}
commit_message: "${{ format('Deploy to GitHub Pages: {0}', github.sha) }}"

- uses: kolpav/purge-artifacts-action@v1
with:
token: ${{ github.token }}
expire-in: 0
9 changes: 3 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
*.DS_Store
*.html
!index.html
*.txt
*.xml
*.nits
.DS_Store
.sass-cache
*.err
*.log
Gemfile.lock
*.js
documents/
*.abort
relaton/
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "https://rubygems.org"

gem "metanorma-cli"
gem "metanorma-nist", source: "https://rubygems.pkg.github.com/metanorma"
4 changes: 4 additions & 0 deletions Gemfile.jekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "https://rubygems.org"

gem "github-pages"
gem "webrick"
508 changes: 276 additions & 232 deletions README.md

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
theme: jekyll-theme-slate
title: ACVP
description: Industry Working Group on Automated Cryptographic Algorithm Validation

# TODO: Uncomment this block after merging into usnistgov/ACVP
# url: https://pages.nist.gov
# baseurl: "/ACVP" # the subpath of your site, e.g. "/blog"
# repository: "usnistgov/ACVP"

# This disables the "View on GitHub" button on the Slate theme
github:
is_project_page: false

# Reading Files
# include:
exclude:
- slides
- iev
- relaton
- Images
- src
- metanorma.yml

plugins:
- jekyll-coffeescript
- jekyll-default-layout
- jekyll-gist
- jekyll-github-metadata
- jekyll-optional-front-matter
- jekyll-paginate
- jekyll-readme-index
- jekyll-titles-from-headings
- jekyll-relative-links
32 changes: 32 additions & 0 deletions _includes/head-custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!-- start custom head snippets, customize with your own _includes/head-custom.html file -->
<script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://pages.nist.gov/nist-header-footer/css/nist-combined.css">
<script src="https://pages.nist.gov/nist-header-footer/js/nist-header-footer.js" type="text/javascript" defer="defer"></script>
<script src="https://pages.nist.gov/leaveNotice/js/jquery.leaveNotice-nist.min.js" type="text/javascript"></script>

<script async type="text/javascript" id="_fed_an_ua_tag" src="https://dap.digitalgov.gov/Universal-Federated-Analytics-Min.js?agency=NIST&subagency=github&pua=UA-66610693-1&yt=true&exts=ppsx,pps,f90,sch,rtf,wrl,txz,m1v,xlsm,msi,xsd,f,tif,eps,mpg,xml,pl,xlt,c"></script>

<script type="text/javascript">
$(document).ready(function(){
// Mark external (non-nist.gov) 'a' tags with class "external"
// If the address start with https and ends with nist.gov
var re_nist = new RegExp('^https?:\/\/((^\/)*\.)*nist\\.gov(\/|$)');
// Regex to find address that start with https
var re_absolute_address = new RegExp('^((https?:)?\/\/)');
$("a").each(function(){
var url=$(this).attr('href');
if(re_nist.test(url) || !re_absolute_address.test(url)){
$(this).addClass('local');
}else{
$(this).addClass('external');
}
});

// Add leaveNotice to external 'a' elements
$('a.external').leaveNotice({
siteName: 'ACVP Specification',
});
});
</script>
<link rel="stylesheet" type="text/css" href="https://pages.nist.gov/leaveNotice/css/jquery.leaveNotice.css" />
<!-- end custom head snippets -->
Loading