Skip to content

Commit de42981

Browse files
committed
Automatic ICD generation
1 parent 3b56ea9 commit de42981

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/pages.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: pages.yml
2+
on:
3+
push:
4+
branches:
5+
- "main_protected"
6+
7+
jobs:
8+
build:
9+
name: "Generate pages"
10+
runs-on: "ubuntu-22.04"
11+
12+
environment:
13+
name: github-pages
14+
url: ${{ steps.deployment.outputs.page_url }}
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
path: application
20+
21+
- name: Setup Pages
22+
uses: actions/configure-pages@v5
23+
24+
- name: Disable man-db auto-update
25+
run: sudo rm -f /var/lib/man-db/auto-update
26+
27+
- name: Generate skeleton
28+
run: |
29+
mkdir -p _site
30+
cat << EOF > _site/index.html
31+
<!DOCTYPE html>
32+
<meta charset=utf-8>
33+
<title>Redirecting...</title>
34+
<link rel=canonical href="./icd/">
35+
<meta http-equiv=refresh content="0; url=./icd/">
36+
EOF
37+
38+
mkdir -p _site/icd
39+
40+
- name: Download & install asn1scc
41+
working-directory: "~"
42+
run: |
43+
wget "https://github.com/scsd-cdh/asn1scc/releases/download/latest/asn1scc.linux.x86_64.zip" -o asn1scc.zip
44+
unzip -d asn1scc asn1scc.zip
45+
46+
- name: Generate ICD
47+
run: |
48+
~/asn1scc/asn1scc --icdacn icd.html APP/_asn1/*.asn1
49+
mv icd.css _site/icd/icd.css
50+
mv icd_new.html _site/icd/index.html
51+
52+
- name: Upload artifact
53+
uses: actions/upload-pages-artifact@v3
54+
with:
55+
path: '_site'
56+
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)